How to change the connection from Github from SSH to HTTPS?

I created my first repository on Github yesterday. When creating the connection, I used SSH instead of https, so I went through a bit of a painful creation and connection of SSH keys. At some point, I got stuck and the connection failed. At this point, I thought about how I can cancel the process that has begun and start with an https connection. Fortunately, today I got a connection working through SSH, but I'm interested in learning about the possibility of changing the type of connection (SSH vs https), and if there is a way to do it.

+6
source share
1 answer

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 display updated URLs.

See the documentation for git-remote for details.

+10
source

Source: https://habr.com/ru/post/988619/


All Articles