Jenkins credentials issue

Today i faced with below issue while the github was ported to some new hardware or network. So this resulted in below issue for the data pipeline i already had in my jenkins setup for Big Data.

Issue1: Below was due to issue2

ssh: Could not resolve hostname Temporary failure in name resolution
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Build step 'Execute shell' marked build as failure


Failed to connect to repository : Command "git ls-remote -h HEAD" returned status code 128:
stderr: fatal: unable to access '': Could not resolve host:; Unknown error 


Is to generate a personal access token by following below steps:

a) In your github link go to settings –> Developer settings –> Personal access tokens

b) Click on Generate new token

c) Update Jenkins credentials in your Job: (click on labels with ” ” below)

Top left “jenkins” –> “Credentials” –> Delete previous user and then recreate it.

d) If the issue1 persists update the ssh key from the linux system you are trying to use the git.

Go to

Click on “New SSH key” and add the ssh key generated in your linux system.

[root@hostname project-pipeline]# ssh-keygen -t rsa -b 4096 -C “”
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:
The key’s randomart image is:
+–[ RSA 4096]—-+
| |
| |
| |
| . |
| . S + |
| . o + o |
| E .= .o|
| .=.o..=+|
| oO=++o+|
[root@hostname project-pipeline]# eval “$(ssh-agent -s)”
Agent pid 5742
[root@hostname project-pipeline]#

[root@hostname project-pipeline]# cat /root/.ssh/
starts with ssh-rsa*************
[root@hostname project-pipeline]#


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s