gpt4 book ai didi

通过 https 更新 Git 子模块

转载 作者:IT王子 更新时间:2023-10-29 01:18:16 25 4
gpt4 key购买 nike

我坐在一个只允许 http/https 流量的代理上,我能够从 Github 克隆一个存储库,但我必须使用 https URL 和用户名/密码来获取/推送。

现在我的问题是一个包含子模块的存储库,当我执行 git submodule update 时超时,我只能假设这是因为它使用的是被阻止的 SSH 连接。 (它甚至不要求我提供私有(private) repo 的密码)

最佳答案

使用 https url 编辑你的 .gitmodules 文件,例如:

[submodule "vendor/engines/fat_free_crm"]
path = vendor/engines/fat_free_crm
url = https://github.com/fatfreecrm/fat_free_crm.git

然后运行 ​​git submodule sync 以反射(reflect)对您的 .git/config 文件的更改。

致谢:https://stackoverflow.com/a/6632693/1273077

关于通过 https 更新 Git 子模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11410017/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com