简体   繁体   中英

Cloning a Bitbucket repository via ssh

How do I clone a repository from Bitbucket via ssh instead of http ? I already have git installed in my local machine (Windows).

  1. Generate an SSH key: ssh-keygen -t rsa -C "your-email-address"
  2. Press Enter key until a randomart image is generated.
  3. Log into Bitbucket -> View profile -> Manage account -> SSH keys -> Add key
  4. Paste the key you have generated in Step 1 in the text box. To get the key, run the following command: cat ~/.ssh/id_rsa.pub
  5. Go to your repository -> Clone . Now you can see the SSH url for your repository. Copy it.
  6. Clone your repository: git clone <ssh-url>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM