# Cannot connect to repository (code 128)

**URL:** https://community.jenkins.io/t/cannot-connect-to-repository-code-128/3179
**Category:** Ask a question
**Created:** [July 27, 2022, 8:19am UTC](https://community.jenkins.io/t/cannot-connect-to-repository-code-128/3179 "2022-07-27T08:19:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ybr](https://avatars.discourse-cdn.com/v4/letter/y/df788c/32.png) [@Ybr](https://community.jenkins.io/u/Ybr)
#### Post date: [July 27, 2022, 8:19am UTC](https://community.jenkins.io/t/cannot-connect-to-repository-code-128/3179/1 "2022-07-27T08:19:20Z")

</div>

Hello everybody,

I am trying to run a job in Jenkins. I created the job and started to configure it. On the “Source Code management” tab I entered my URL from Gitea and got the following error message:

 ![MicrosoftTeams-image](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/5/5f1f122762e32d77b02620ba62172295a22acab9.png)

In text:

Failed to connect to repository : Command “C:\Program Files\Git\bin\git.exe ls-remote -h – http:// axess.git:3000/QA/QA\_ReservationManager\_automation.git HEAD” returned status code 128:  
stdout:  
stderr: remote: User permission denied  
fatal: unable to access ‘http:// axess.git:3000/QA/QA\_ReservationManager\_automation.git/’: The requested URL returned error: 403

On another hand, I have some other job with the following URL and it works fine: http:// axess.git:3000/m.grunko/BasicTests.git

I tried the following solution, but this did not help: [Jenkins How to solve Failed to connect to repository - YouTube](https://www.youtube.com/watch?v=F5QKON50xP8) (so the direct path is already entered in “Manage Jenkins - Global Tool Configuration - Git - Path to Git executable” and the git.exe is actually situated in this location)

I found also a couple other instructions, but they are a bit too hard to understand for me, since I am really beginner in Jenkins. Could somebody help with a bit detailed guide?

Regards,  
Mischa

---

<div class="post-metadata">

### Author: ![Ybr](https://avatars.discourse-cdn.com/v4/letter/y/df788c/32.png) [@Ybr](https://community.jenkins.io/u/Ybr)
#### Post date: [July 27, 2022, 11:53am UTC](https://community.jenkins.io/t/cannot-connect-to-repository-code-128/3179/2 "2022-07-27T11:53:33Z")

</div>

The problem resolved. The problem was with permissions of folders in Gitea ([http://axess.git:3000/QA/QA\_ReservationManager\_automation.git](http://axess.git:3000/QA/QA_ReservationManager_automation.git)). What I did (not sure what concrete was the solution):

- Remove the tick from the settings page of the git folder:  
\*\* Open the page (http:// axess.git:3000/QA/QA\_ReservationManager\_automation.git)  
\*\* Find the Settings button on the right side below the “Fork” button  
\*\* Navigate to the “Repository” tab, “Basic settings” section  
\*\* Tick off the “Make Repository Private” checkbox
- Remove another tick from the parent folder:  
\*\* Open the page (http:// axess.git:3000/QA)  
\*\* Find the gear icon right to the folder name  
\*\* Open the “Organization” tab  
\*\* Select the “Limited (Visible to logged in users only)” radio button

---

<div class="post-metadata">

### Author: ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)
#### Post date: [July 28, 2022, 7:03am UTC](https://community.jenkins.io/t/cannot-connect-to-repository-code-128/3179/3 "2022-07-28T07:03:02Z")

</div>

Thanks a lot for the feedback @Ybr and welcome to this community 👋

---

<div class="post-metadata">

### Author: ![estjtype8](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/estjtype8/32/4781_2.png) [@estjtype8](https://community.jenkins.io/u/estjtype8)
#### Post date: [July 16, 2023, 10:01am UTC](https://community.jenkins.io/t/cannot-connect-to-repository-code-128/3179/4 "2023-07-16T10:01:32Z")

</div>

thank you Sir, helped me a lot
