How to Change GitHub Remote from HTTPS to SSH?
Hello,
This tutorial shows you how to switch remove https to ssh. This article goes in detailed on github change remote https to ssh. you will learn github change https to ssh. i would like to share with you change github repo from https to ssh. you will do the following things for command to change https to ssh git repo.
i will give you simple "git remote set-url {repo_path}" command to change https to ssh url. basically, when you are using https then you must need to add username and password each time on pull and push request to github. but if you use ssh then you don't need to add username and password each time.
let's see how to switch github remote from https to ssh url.
you can check which remote url now available in your project by using bellow command:
git remote -v
it will give you layout like as bellow:
origin http://github.com/{USERNAME}/{PROJECTNAME}.git (fetch)
origin http://github.com/{USERNAME}/{PROJECTNAME}.git (push)
now you can change by using following command:
Change Remote from HTTPS to SSH:
git remote set-url origin git@github.com:{USERNAME}/{PROJECTNAME}.git
now it will changed.
you can also check by git remote -v command.
i hope it can help you.
thank you.
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- Solved - fatal remote origin already exists - Git
- How to Merge Branch to Master Branch using Git Command?
- Git Command to Ignore File Permission Changes
- How to Add Git Add Remote Origin on Bitbucket Repository?
- Git - How to Find a Deleted File in Commit History?
- How to Configure Git Username and Email?
- Git - error failed to push some refs to git resolve - Solved
- How to Git Force Pull from Remote Branch?
- Git Remove Last Commit from Local Example
- How to remove current changes from local system in Git ?