简体   繁体   中英

Jenkins Service Cannot access GIt repository Ussing SSH

I have installed Jenkins on remote server (ubuntu) and created a project. ( https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04 )

Then I created key pair using ssh-keygen and added public key to the bitbucket project. ( https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html ) Now there is a capability to execute git commands on terminal of remote server such as git clone . and it works fine.

But the problem is when I add git repository to the jenkins Source Code Management section it shows an error of permission denied. Can anyone explain how can I set git repository on jenkin'ssource code management section correctly. I have added a SS of the error message.

错误截图

The error points to the host key missing in known_hosts file. Login to the jenkins server as user 'jenkins'. Checkout you repo using ssh url, you will see a SSH warning when connecting to a new host for first time. Enter yes. The host key for bitbucket.org will now be added to the ~/.ssh/known_hosts file

That should resolve the error you are seeing

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM