Lab137
articles

Using SSH with Git Repositories

Published Sat 02 May 2020 in articles

by Jay Ess til git ssh

If you've setup your git account to use SSH, then should be pretty straightforward. My usual workflow was to git clone the URL of the repository, but I decided to use SSH instead because I was annoyed with having to always enter my credentials. This is how to do it.

Note:For the most part, I use GitHub but just replace github.com with whatever service you're using.

Cloning a Repository

git clone git@github.com:<username>/<reponame>.git

Changing the Remote to Use SSH

If you've already cloned a repo without using SSH, then you can modify the branch to use SSH

git remote set-url origin git@github.com:<username>/<reponame>.git

Other Pages

  • About
  • Privacy Policy

Social

  • LinkedIn
  • GitHub
  • Atom Feed

License

  • CC BY-SA 4.0
Bulrush theme for Pelican HTML 5 CSS 3 Made with Bulma