我在让jenkins更新作曲家时遇到了一些问题,因为其中一个作曲家依赖项是托管在Github上的私有git代码库。
在命令行中使用composer update命令时,我也遇到了问题:
$ cd /var/lib/jenkins/jobs/JOB/workspace
$ ls -la auth.json
-rw-rw-r-- 1 jenkins jenkins 99 Aug 3 15:49 auth.json
$ cat auth.json
{
"github-oauth" : {
"github.com" : "<notAvailableOnSO>"
}
}
$ composer update -n错误:
Failed to clone the git@github.com:<Org>/<Project>.git repository, try running in interactive mode so that you can enter your GitHub credentials
[RuntimeException]
Failed to execute git clone --mirror 'https://***:***@github.com/<Org>/<Project>.git' '/var/lib/jenkins/.composer/cache/vcs/git-github.com-<Org>-<Project>.git/'
Cloning into bare repository '/var/lib/jenkins/.composer/cache/vcs/git-github.com-<Org>-<Project>.git'...
remote: Repository not found.
fatal: repository 'https://***:***@github.com/<Org>/<Project>.git/' not found我正在尝试更新的项目在其composer.json中有以下存储库设置:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/<Org>/<Project>.git"
}
]即使没有-n (交互模式),我也可以输入github oauth令牌,让composer报告令牌已保存,但仍然会收到错误。
我是不是把auth.json放错了地方,或者我应该以不同的方式进行授权?
(为了部署工作,在github上发布专有源代码显然是不可能的)
发布于 2016-08-03 22:27:45
我得到了"composer update“命令(命令行和通过jenkins)。
在实际阅读错误消息并了解存储库对用户不可用后,登录到github,我通过确保github用户实际上被允许对存储库进行读访问来解决我的问题。
:)
https://stackoverflow.com/questions/38745918
复制相似问题