SSH Key - Still asking for password and passphrase

后端 未结 30 1377
孤街浪徒
孤街浪徒 2020-11-27 08:35

I\'ve been somewhat \'putting up\' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an annoyance w

30条回答
  •  北海茫月
    2020-11-27 09:30

    Make sure you are using ssh for your repository also

    mahtab@mahtab-Lenovo-G50-70:~/my-projects/jenkins-cje-2017$ git remote -v origin git@github.com:eMahtab/jenkins-cje-2017.git (fetch) origin git@github.com:eMahtab/jenkins-cje-2017.git (push)

    Don't use https, if your remote is using https then it will keep asking for password, even If you have added the public key to Github and added private key to ssh-agent. Below will always ask for password

    mahtab@mahtab-Lenovo-G50-70:~/my-projects/jenkins-cje-2017$ git remote -v origin https://github.com/eMahtab/jenkins-cje-2017.git (fetch) origin https://github.com/eMahtab/jenkins-cje-2017.git (push)

提交回复
热议问题