Git - Switch Remote URL


Git - Switch Remote URL

Balu
Balu Infrastructure Solution Architect | SRE | DevOps Manager | Platform Engineer | Monitoring | CICD | ODD | SQL/NoSQL | ELK | AWS | Jhipster | Microservices | Agile | Scrum
Git - Switch Remote URL

Switching remote URLs from HTTPS to SSH

List existing URLs

  • List your existing remotes in order to get the name of the remote you want to change.
git remote -v

# Output

origin	https://github.com/JinnaBalu/jinnabalu.github.io.git (fetch)
origin	https://github.com/JinnaBalu/jinnabalu.github.io.git (push)

Change your remote’s URL

  • Change your remote’s URL from SSH to HTTPS with the git remote set-url command.
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

comments powered by Disqus