How to change a connection to GitHub from SSH to HTTPS?

前端 未结 2 1260
我寻月下人不归
我寻月下人不归 2021-02-02 07:30

I created my first repository in GitHub yesterday. When making the connection I used SSH instead of HTTPS, so I went through a little painful SSH key creation and connection pro

2条回答
  •  没有蜡笔的小新
    2021-02-02 08:27

    Assuming your remote is called origin, run

    • git remote set-url origin https://...
    • git remote set-url --push origin https://...

    You can view the configured remotes with git remote -v, which should now show your updated URLs.

    See the documentation for git-remote for more details.

提交回复
热议问题