I am trying to setup an automated pipeline between Jenkins and Gogs and am having some issues with connecting the two together. I feel like I have followed the process correctly but am still receiving a 401 at the end of it.
Here are the steps I have undertaken:
1) Log into my jenkins master server and log into the jenkins user
2) generate a key pair
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
3) Added Private key to jenkins under global credentials
4) Added public key to Gogs
5) Go to create a new pipeline, when I enter the repository name I get the following erorr:
Help for feature: Repository URL
Failed to connect to repository : Command "git ls-remote -h https://www-git1.mmm.local/git-admin/SF-Firefly-RK3399 HEAD" returned status code 128:
stderr: error: The requested URL returned error: 401 Unauthorized while accessing https://www-git1.mmm.local/git-admin/SF-Firefly-RK3399/info/refs
fatal: HTTP request failed
So I am not sure if this will be an issue but I realized that my gogs server and jenkins master are running two different versions of git:
Gogs: git version 188.8.131.52
Jenkins: git version 1.7.1
Could this be the source of my problem?