php - Composer 不会从私有 git 存储库克隆
问题描述
我有一个项目,它有一个私有 gitlab 存储库作为其依赖项之一。composer.json
包含这个:
"repositories": [
{
"type": "vcs",
"url": "git@git.my_gitlab_domain.com:my/project.git"
},
]
我可以通过 ssh 访问这个存储库,这意味着我可以使用它下载它,git clone
而无需输入密码或用户名。但是,当我尝试使用composer install
composer 安装依赖项时,要求我输入另一个用户的密码(我没有,我的用户名是ssagitov):
- Syncing my/project (dev-master 620b5ef) into cache
git@git.my_gitlab_domain.com's password:
我尝试全局配置作曲家以直接通过以下方式使用我的密码:
composer config --global http-basic.git.my_gitlab_domain.com ssagitov my_password
那没有用,所以我尝试使用
composer config --global gitlab-token.git.my_gitlab_domain.com my_personal_access_token
我还将 git.my_gitlab_domain.com 添加到gitlab-domains
composer config --global gitlab-domains git.my_gitlab_domain.com
正如你所看到的,这些都不起作用,所以我没有想法,我该如何解决这个问题?
解决方案
推荐阅读
- sql - 如何根据同一张表中的数据更新 MS Access 表中的缺失数据?
- javascript - Angular 6调用方法并将值分配给*ngFor中的变量
- python - 将 pbixrefresher 添加到 Python
- javascript - 首次提交时未显示验证错误消息
- javascript - Chromium 47.0.2518.0 未加载 javascript 文件
- c# - UWP“当前上下文中不存在名称调度程序”
- javascript - 自定义 javascript 正则表达式,如 wordpress 页面图块
- python - 以下 3 种方式在构造函数中声明属性有什么区别?
- php - Dockerfile 不安装 RUN 依赖项
- python - 使用 Active X 控制 LabView Vi 与开源 Python 自动化包的权衡/好处?