git - 可以配置 Composer 使用 http 而不是 git clone git@

标签 git composer-php git-clone

我们正在使用一些带有 satis 的私有(private)存储库,首先尝试使用 git clone @git 下载代码,两次尝试后使用 git clone http://....

有什么方法可以配置 Composer 默认与私有(private)存储库 git clone http 一起使用?

谢谢。

奥斯卡

最佳答案

您可以尝试进行测试:

git config --global url."https://github.com/".insteadOf <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="086f617c486f617c607d6a266b6765" rel="noreferrer noopener nofollow">[email protected]</a>:
git config --global url."https://".insteadOf git://

这将确保任何使用 git clone 的系统(如 Composer)都将使用 HTTPS URL 而不是 SSH URL。

关于git - 可以配置 Composer 使用 http 而不是 git clone git@,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55477379/

相关文章:

linux - git repo 中的文件都已删除且未被跟踪,但它们仍然存在。这怎么可能?

php - 错误 : git was not found - installing laravel with composer windows

php - 通过composer命令在Laravel安装程序中出错

gitlab 重定向推送/获取/克隆以登录

c++ - 使用 SourceTree 克隆 GitHub 上的公共(public)存储库

java - 错误:SSL peer shut down incorrectly

git pull 到 bash 脚本中

git repository failed to traverse parent 错误

git - 难道我的 GitHub SSH key 不应该让我每次都免于编写凭据吗?

ubuntu - Laravel 4 ubuntu Composer 安装/更新错误