Am Freitag, dem 26.04.2024 um 00:25 +0200 schrieb Erick Mormin:

Unfortunately, I'm still encountering problems despite several attempts to 
resolve them. Here are the errors I'm encountering:

In GitLab:

Hook executed successfully but returned HTTP 403
<html> <head> <meta http-equiv="Content-Type" 
content="text/html;charset=ISO-8859-1"/> <title>Error 403 Invalid access 
token</title> </head> <body><h2>HTTP ERROR 403 Invalid access token</h2> 
<table> <tr><th>URI:</th><td>/git/notifyCommit</td></tr> 
<tr><th>STATUS:</th><td>403</td></tr> <tr><th>MESSAGE:</th><td>Invalid access 
token</td></tr> <tr><th>SERVLET:</th><td>Stapler</td></tr> </table> <hr/><a 
href="https://eclipse.org/jetty<https://urldefense.com/v3/__https://eclipse.org/jetty__;!!Obbck6kTJA!dux-7UwMxfYci0s-LDIgC9KMzPF0im5AlWHqnW-VcQeqnZT8uibEh4CEYn5JpyItjsib7CA0biig7DvN_hYGPaQ$>">Powered
 by Jetty:// 10.0.20</a><hr/> </body> </html>

Well, it has all the information you need: "Invalid access token". Make sure 
you provide a valid token (means: as created under "Manage Jenkins" -> 
"Security" -> "Git plugin notifyCommit access tokens").

In Jenkins, when triggering a build:

The recommended git tool is: NONE
using credential jenkinsgitlabssh
 > 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'
using GIT_SSH to set credentials Test EasyFormer23042024
Verifying host key using known hosts file, will automatically accept unseen keys
 > 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

Please check that cloning the repo works in general, by logging in to a shell 
on the Jenkins server, as the user that runs Jenkins, and executing a "git 
clone" command. If that works, it will usually also work from within Jenkins. 
Or, try to get it working with HTTP, first,

Additionally, I've updated the webhook URL in Jenkins as follows:

That's a type, I guess, and you mean ("in GitLab"), right?

http://192.168.0.24:8080/git/notifyCommit?url=http://192.168.0.24:40080/Berechit/easyformer.git&token=11b263dbb6e2a1f398bee5f391e98041a5<https://urldefense.com/v3/__http://192.168.0.24:8080/git/notifyCommit?url=http:**A192.168.0.24:40080*Berechit*easyformer.git&token=11b263dbb6e2a1f398bee5f391e98041a5__;Ly8vLw!!Obbck6kTJA!dux-7UwMxfYci0s-LDIgC9KMzPF0im5AlWHqnW-VcQeqnZT8uibEh4CEYn5JpyItjsib7CA0biig7DvNngarbLM$>

I wrote that the repo URL (the part after "url=") must match exactly (means: 
letter by letter) the one used in the Jenkins Job. But you're using an HTTP URL 
here and an SSH URL in the job. That doesn't work.

HTH...

Dirk

--

Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@opentext.com<mailto:dhein...@opentext.com>
Website: 
www.recommind.de<mail://ab5defde1fa49913f64f8482009c4be447b3cf96/Gesendete%20Elemente/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/3c1b03e33a805c3bfd1a7c4a40d2b696a5c0cf10.camel%40opentext.com.

Reply via email to