Skip to content

Instantly share code, notes, and snippets.

@travishorn
Created April 17, 2023 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travishorn/b533452564e250cdf4420e533103602c to your computer and use it in GitHub Desktop.
Save travishorn/b533452564e250cdf4420e533103602c to your computer and use it in GitHub Desktop.
git clone via SSH with an identity file (private key)
git clone myusername@myserver:/home/git/myrepo
# `myusername` is your username on the server which hosts a bare git repository
# `myserver` is a `Host` configured in `~/.ssh/config` on your local machine
# `/home/git/myrepo` is the path to the bare repository on the server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment