Skip to content

Instantly share code, notes, and snippets.

@binaryk
Last active August 4, 2020 18:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save binaryk/a449aabb782186c02f3b to your computer and use it in GitHub Desktop.
Save binaryk/a449aabb782186c02f3b to your computer and use it in GitHub Desktop.
cd ~/.ssh
ssh-keygen -t rsa
cat id_rsa.pub
copy key
go to BitBucket -> Accounts -> Security -> SSH -> Add key -> Paste key
go to server -> Before we begin, navigate to your repository on the Bitbucket website and copy its SSH URL. This will be in the format git@bitbucket.org:<username>/<repo-name>.git
example: git clone --mirror git@bitbucket.org:<username>/<repo-name>.git
Notice the --mirror flag? As its name implies this flag creates an exact mirror of the source repository, including mapping it’s remote branches. It implies --bare, which means that our repository will not have a working copy.
Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment