Still requiring login after SSH authentication

后端 未结 4 2363
面向向阳花
面向向阳花 2021-01-30 00:22

I followed everything in the GitHub tutorial: https://help.github.com/articles/generating-ssh-keys

I did all the commands in the directory of my repository. I reached th

4条回答
  •  心在旅途
    2021-01-30 00:40

    I was able to stop the username & password prompt by opening .git/config from the base repo directory and changing the remote URL.

    For example:

    [remote "origin"]
        url = https://github.com/username/my-repo.git
    

    should be changed to:

    [remote "origin"]
        url = git@github.com:username/my-repo.git
    

提交回复
热议问题