Permission denied (public key) during fetch from GitHub with Jenkins user on Ubuntu

前端 未结 8 896
盖世英雄少女心
盖世英雄少女心 2021-02-02 07:56

Here is my setup:

  1. Jenkins is running on my linux machine as \'jenkins\' user.
  2. I have generated a ssh key-pair as described in Linux - Setup Git, for the \
8条回答
  •  情深已故
    2021-02-02 08:41

    To check are the following:

    1. if the right public key (id_rsa.pub) is uploaded to the git-server.
    2. jenkins user will access to github -> to CHECK if the right private key (id_rsa) is copied to /var/lib/jenkins/.ssh/
    3. if the known_hosts file is created inside ~/.ssh folder. Try ssh -vvv git@github.com to see debug logs. If thing goes well, github.com will be added to known_hosts.
    4. if the permission of id_rsa is set to 755 (chmod 755 id_rsa)

    After all checks -> try ssh -vvv git@github.com Dont try to do config in jenkins until ssh works!

提交回复
热议问题