没有SSH的Git和Bitbucket [英] Git and Bitbucket without SSH
问题描述
我在我的计算机上建立了一个本地git存储库,并试图将其推送到新创建的Bitbucket帐户。
问题是Bitbucket给我一个 ssh
url来推送,但是我在网络上大学)有ssh端口被阻止用于外部ssh。因此,这失败了,如果我试图用 https://
替换 ssh://
,它会一直告诉我身份验证失败。
有没有办法在不使用 ssh
?
您可以通过HTTPS连接到GitHub和Bitbucket存储库。两者都可以让你推送。
这些是HTTPS访问的典型URL:
https://username@bitbucket.org/username/repository.git
https://github.com/username/repository.git
请注意,只要您想与远程进行通信,Git就会提示您输入密码。
I've set up a local git repository on my computer, and I'm trying to push that to a newly created Bitbucket account.
The problem is that Bitbucket gives me an ssh
url to push to, but the network I'm on (university) has the ssh port blocked for external ssh. So that fails, and if I try to replace ssh://
with https://
it keeps telling me that authentication has failed.
Is there a way to push to bitbucket without using ssh
?
You can connect to GitHub and Bitbucket repositories via HTTPS. Both will also let you push.
These are the typical URLs for HTTPS access:
https://username@bitbucket.org/username/repository.git
https://github.com/username/repository.git
Note that Git will prompt you for your password whenever you want to communicate with the remote.
这篇关于没有SSH的Git和Bitbucket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!