Cannot connect to repository (code 128)

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:

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:
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 (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?


The problem resolved. The problem was with permissions of folders in Gitea (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
1 Like

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

1 Like