Hi, I'm having trouble getting access to a local git repository:
System: CentOS 7 I'm running Jenkins as a service using system When I try to set up a job with Git, the URL field shows the following error: Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h git@localhost:repositories/puq 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. In order to test what is happening, I run the following script: whoami echo $USER cd /tmp rm -rf test mkdir test cd test git clone git@localhost:repositories/puq Which gives the following output: + whoami jenkins + echo jenkins jenkins + cd /tmp + rm -rf test + mkdir test + cd test + git clone git@localhost:repositories/puq Cloning into 'puq'... 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. So, basically the same error. When I run the same clone command from the command line (logged in as jenkins), however, the clone succeeds... I have the feeling I'm missing something obvious - can anyone tell me what's going on? Henk van Voorthuijsen -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4e09f72f-f23b-4eeb-8eb7-4779df08cee1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
