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

前端 未结 8 734
盖世英雄少女心
盖世英雄少女心 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:34

    If you are running jenkins as a service in windows, you need to verify the user running the service. If you created the keys using the user "MACHINENAME\user", change the service so the user running it can match

    0 讨论(0)
  • 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!

    0 讨论(0)
提交回复
热议问题