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

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

    For Mac users, the issue can be solved by removing the existing keys and creating new Private and Public Keys by following these steps:

    1.Remove all Public and Private keys located at /Users/Username/.ssh

    2.Remove all the credentials saved under the Credentials tab in Jenkins.

    3.Remove the existing Public SSH keys defined in the Github Repository Settings.

    4.Create new SSH keys (private and public: id_rsa and id_rsa.pub) by following the steps from https://confluence.atlassian.com/bitbucketserver/creating-ssh-keys-776639788.html#CreatingSSHkeys-CreatinganSSHkeyonLinux&MacOSX

    5.Set the newly created public SSH key (id_rsa.pub) in Github or an equivalent Repository Settings.

    6.In Jenkins,create new credentials by adding the private SSH key(id_rsa) for your Github username.

    7.The Error should be removed now.

提交回复
热议问题