need help with a problem with Github. I have been using jenkins to deloy my code automatically from Github. in which I've been using SSH for the authentication. it works great until recently my company network dept decide to close port 22 for SSH, which made my connection to Github failed in timeout.
been reading a lot of workaround, and it seems I can use SSH over HTTPS port by creating config file for my ssh connection. So I did by creating this config:
Host github.com
Hostname ssh.github.com
Port 443
User git
my git successfuly listening to port 443, but it came with a different issue:
been looking information about this issue and most of it saying that the reason for port closed by [ip] error are because my IP was blacklisted by the host, in this case Github. which I don't think that would be the case. do anyone have any info regarding what might be causing this?
and then, the workaround that a lot of people use is to add Github public key to my server known_hosts. I tried it but it doesn't work. do anybody knows the workaround for this problem?
CodePudding user response:
I tried using https URL just like @VonC recommended. it works on my server but not on my jenkins.
so I use personal access code instead, you can found the tutorial on how to create a personal access token personal access token tutorial
then you can set up your repo url like this:
https://<access token>@github.com/<userName>/<repository>.git
it works for now, so I will close this thread. will update if there any solution from my network admin.
thanks.
CodePudding user response:
I tried it but it doesn't work
It depends what you have added.
Try and add the output of ssh-keyscan ssh.github.com