Subject: Issue with accessing GitLab repository from Jenkins

Dear Dirk,

I hope this email finds you well. I am reaching out to you because we are
currently experiencing an issue with accessing a GitLab repository from our
Jenkins instance, and I would like to request your assistance in resolving
it.

Problem Description:
We have configured Jenkins to access a GitLab repository hosted at
`192.168.0.24:Berechit/easyformer.git`, but we are encountering
authentication errors when attempting to retrieve changes from this
repository. Despite several checks, we have been unable to resolve the
issue.

Verified Elements:
- Correct configuration of SSH keys in GitLab and Jenkins.
- Permissions on the GitLab repository have been checked and appear to be
correct.
- SSH keys have been manually tested from the Jenkins container and appear
to be functioning correctly.
- Jenkins logs indicate an authentication error when attempting to retrieve
changes from the repository.

WARNING: Unknown parameter(s) found for class type
'jenkins.plugins.git.GitStep': credentials
The recommended git tool is: NONE
No credentials specified
 > git rev-parse --resolve-git-dir
/var/jenkins_home/workspace/EasyFormerPipeline/.git # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url
git@192.168.0.24:Berechit/easyformer.git # timeout=10
Fetching upstream changes from git@192.168.0.24:Berechit/easyformer.git
 > git --version # timeout=10
 > git --version # 'git version 2.39.2'
 > git fetch --tags --force --progress --
git@192.168.0.24:Berechit/easyformer.git
+refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from
git@192.168.0.24:Berechit/easyformer.git
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)
        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1241)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
        at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
        at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
        at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
        at 
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags
--force --progress -- git@192.168.0.24:Berechit/easyformer.git
+refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: Permission denied, please try again.
Permission denied, please try again.git@192.168.0.24: Permission
denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

        at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2846)
        at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
        at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:997)
        ... 11 more
ERROR: Error fetching remote repo 'origin'
ERROR: Maximum checkout retry attempts reached, aborting

Actions Taken:
- Restarted the Jenkins instance.
- Checked permissions and SSH configurations in GitLab and Jenkins.
- Manually tested SSH keys from the Jenkins container.

root@easyformer:~# ssh -T git@192.168.0.24
git@192.168.0.24's password:

root@easyformer:/tmp# git clone git@192.168.0.24:Berechit/easyformer.git
Clonage dans 'easyformer'...
git@192.168.0.24's password:

Request for Assistance:
We would like to request your expertise to help us resolve this issue. Do
you have any additional suggestions on what we could check or avenues we
could explore to resolve this situation?

Thank you in advance for your valuable assistance.

Best regards,
Erick MORMIN

Le ven. 26 avr. 2024 à 15:58, 'Dirk Heinrichs' via Jenkins Users <
jenkinsci-users@googlegroups.com> a écrit :

> Am Freitag, dem 26.04.2024 um 15:38 +0200 schrieb Erick Mormin:
>
> Jenkins Integration
> - URL:
> http://192.168.0.24:8080/git/notifyCommit?url=http://192.168.0.24:40080/Berechit/easyformer.git&token=75a8746bcf9c658b08491f27860f356d
> <https://urldefense.com/v3/__http://192.168.0.24:8080/git/notifyCommit?url=http:**A192.168.0.24:40080*Berechit*easyformer.git&token=75a8746bcf9c658b08491f27860f356d__;Ly8vLw!!Obbck6kTJA!YP12DT9r7dprV4cgFGbRPwzcikobHoB6pohGNLo2KDfWwBe6N94RfsLi5ApaCWKEkCZBH7f8soyfSSlc4VnMy98$>
>
>
> Glad you got it working. However, this will still not trigger build in
> until the "?url=..." parameter matches exactly the repository URL in your
> job's SCM configuration. So you either need to use the SSH URL from the job
> configuration here, too, or change the job configuration to use the HTTP
> URL used here.
>
> Bye...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail sind nicht gestattet.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/cd70bfa8596f1daf5911ae6e4e3c0ebb4331e745.camel%40opentext.com
> <https://groups.google.com/d/msgid/jenkinsci-users/cd70bfa8596f1daf5911ae6e4e3c0ebb4331e745.camel%40opentext.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPrX6vBV9ahB01Law5EBu0fBta3zORh2__rwRCyoh%2Bg6mjMvGA%40mail.gmail.com.

Reply via email to