git - git clone 问题 [套接字:协议不支持地址族]
问题描述
我在共享主机上(巨大的错误)。我已经 ssh 进入它并尝试从 bitbucket.org 克隆一个私有存储库:
git clone git@example.com:MyStuff/private-repository.git
但面临这个问题:
套接字:协议不支持的地址族
ssh:连接到主机 bitbucket.org 端口 22:协议不支持的地址系列
现在看这个页面:https ://forums.gentoo.org/viewtopic-t-127306-start-0.html 。我想也许我需要通过 ssh 禁用 ipv6 来连接到主机。我不能这样做(共享主机)。
有什么帮助吗?
解决方案
在这种情况下,我会在 SSL 上使用克隆,就像这样
git clone https://<repo-url>
如果您不想每次都输入密码,那么另一个不错的技巧是,您可以像这样使用凭证助手:
git config --global credential.helper cache
git config --global credential.https://github.com.username foo
git clone https://github.com/foo/repository.git
以上将导致 Git 每 15 分钟询问一次您的密码(默认情况下)。
推荐阅读
- ios - 在 MapKit 中的地图内设置单个区域
- javascript - javascript函数参数中的字符串返回“输入意外结束”
- python - 如何检查python中是否存在重复的键行值并选择python中具有最大数字列值的行
- javascript - Chrome 扩展 - DOM 未定义 提交表单后
- mongodb - 如何在任意深度更新 MongoDB 字段名称
- apache-flink - PyFlink - 指定表格格式并处理嵌套的 JSON 字符串数据
- testing - 如何在 Tosca 中创建测试事件
- python - Python多线程 - 在线程完成之前重新启动?
- java - EasyMock Java 的 for 循环中的测试方法调用
- c# - C#在LDAP域下验证用户