Jenkins doesn't recognize the ssh alias for my github repo

My server already had jenkins setup for the project with the appropriate ssh key. However, I am developing a new (separate) project and I am trying to integrate with Jenkins CI.

I needed to create an ssh alias and it works like a charm. I've tested cloning a repo from jenkins user on the server and everything works. However, when I submit a test from my github service web site, I get the following in Jenkins logs:

Failed to match URL user @alias: xxx / project.git

Any ideas on how to make the alias work with jenkins + github?

+3


source to share


1 answer


To use an alias, you configure the file ~/.ssh/config

like this:



Host alias
HostName github.com
User user
IdentityFile /home/whoever/.ssh/id_rsa

      

0


source







All Articles