[英]Cloning a Bitbucket repository via ssh
How do I clone a repository from Bitbucket via ssh
instead of http
?如何通过ssh
而不是http
从 Bitbucket 克隆存储库? I already have git
installed in my local machine (Windows).我已经在本地机器(Windows)中安装了git
。
ssh-keygen -t rsa -C "your-email-address"
生成 SSH 密钥: ssh-keygen -t rsa -C "your-email-address"
View profile
-> Manage account
-> SSH keys
-> Add key
登录 Bitbucket -> View profile
-> Manage account
-> SSH keys
-> Add key
cat ~/.ssh/id_rsa.pub
要获取密钥,请运行以下命令: cat ~/.ssh/id_rsa.pub
Clone
. Go 到您的存储库 -> Clone
。 Now you can see the SSH url for your repository.现在您可以看到存储库的 SSH url。 Copy it.复制它。git clone <ssh-url>
克隆您的存储库: git clone <ssh-url>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.