Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

Tags:

On Jenkins which is configured on a CentOS server, I am trying to connect to a git repository on another server using username and password. Unfortunately I am getting following error:

Failed to connect to repository : 
Command "/usr/bin/git -c core.askpass=true ls-remote -h ssh://root@[ip addres]:2020/opt/gitrepo/enpapp.git HEAD" 
returned status code 128:
stdout: 
stderr: Permission denied, please try again. 
Permission denied, please try again. 
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). 
fatal: Could not read from remote repository.*
Please make sure you have the correct access rights and the repository exists.

I am able to connect to git server using Putty.
Also I am able to clone git repository using Netbeans or command line.

The permission of .ssh folder is 700 and known_hosts file is 644