简体   繁体   English

如何在GitBash中禁用SSH并改为使用HTTPS

[英]How to disable SSH in GitBash and use HTTPS instead

I'm using SSH at the moment when connecting to Bitbucket and suddenly the port 22 where Bitbucket uses has been blocked so I decided to use HTTPS option instead. 我在连接到Bitbucket的时候正在使用SSH,而且Bitbucket使用的端口22突然被阻止,所以我决定使用HTTPS选项。 How to disable the ssh in git bash and use HTTPS instead? 如何在git bash中禁用ssh并使用HTTPS代替? I already reinstalled git but it still it uses SSH/Putty to connect. 我已经重新安装了git,但它仍然使用SSH / Putty进行连接。

Thanks. 谢谢。

It's not at git settings, but in your repository settings. 它不是在git设置,而是在您的存储库设置中。

You need to change the address of your remote repository and specify the https:// protocol 您需要更改远程存储库的地址并指定https://协议

git remote set-url origin <repo-https-url>

However with https you'll have to type your password on each push/pull operation, but see Is there a way to skip password typing when using https:// on GitHub? 但是使用https时,您必须在每次推/拉操作时键入密码,但是在GitHub上使用https://时是否有办法跳过密码输入? .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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