我有一台服务器,其中有一些 git 存储库和一个满意的存储库设置。我想设置满足存储库以列出本地存储库。
// satis.json
{
"name": "NJ16 Repositories",
"homepage": "http://packages.example.com",
"repositories": [
{
"type": "vcs",
"url": "https://bitbucket.org/nicholasjohn16/example.git"
},
{
"type": "vcs",
"url": "git@example.com:/var/repo/test-repo.git"
}
],
"require-all": true,
"output-dir": "web/"
}
当我运行它时,bitbucket git repo 被成功访问和更新,但是当 satis 开始构建本地 git repo 时,它挂在以下行并且不会继续。
Executing command (/root/.cache/composer/vcs/git-example.com--repo-test-repo.git): git rev-parse --git-dir
Executing command (/root/.cache/composer/vcs/git-example.com--repo-test-repo.git): git remote -v
Executing command (/root/.cache/composer/vcs/git-example.com--repo-test-repo.git): git remote set-url origin 'git@example.com:/repo/test-repo.git' && git remote update --prune origin
我已经尝试使用../../repo/test-repo.git
and/var/repo/test-repo.git
作为 repo url。当我这样做时,构建成功完成,但是当我尝试使用作曲家要求它时,我收到以下错误。
[RuntimeException]
Failed to execute git clone --no-checkout "C:\wamp\www\nj16\nicholasjohn16\vendor\NicholasJohn16\test-repo" && cd /D "C:\wamp\www\nj16\nicholasjohn16\vendor\NicholasJohn16\test-repo" && git remote add composer && git fetch composer
Cloning into 'test-repo'...
fatal: 'C:\wamp\www\nj16\nicholasjohn16\vendor\NicholasJohn16\test-repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
虽然,它确实引用了最近的提交哈希,所以我知道它至少成功地获取了 repo,但 satis 似乎无法访问数据。
我怎样才能正确地做到这一点?任何帮助表示赞赏。
JFYIgit
是一个用户,拥有自己的 ssh 密钥,该密钥已添加到其中,authorized_users
因此他们可以克隆自己的 repo。