我有一个服务器,在其中我有几个git存储库和一个satis存储库设置。我想设置satis存储库来列出本地repos。
// 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和/var/repo/test-repo.git作为repo url。当我这样做时,构建成功完成,但当我尝试用composer请求它时,我得到了以下错误。
[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似乎没有访问数据的权限。
我怎样才能正确地做这件事?任何帮助都是非常感谢的。
JFYI,git是一个用户,他们有自己的ssh密钥,这个密钥被添加到authorized_users中,这样他们就可以克隆自己的存储库。
发布于 2018-08-29 15:24:11
您好,请确保您正在运行正确的命令和路径
然后在path下面休眠
请转到您的回购路径(C:\wamp\www\nj16\nicholasjohn16\vendor\NicholasJohn16\test-repo)
并初始化空存储库
git init
然后将遥控器也设置为iy,然后设置git remote add composer github-url
如果需要,则添加一个分支
git branch slave
然后,签出到从属分支
然后使用
注意1:请一个接一个地运行,然后您就会知道故障是什么
注2:请重新检查您正在运行的命令
注3: fallow my steps
https://stackoverflow.com/questions/52021918
复制相似问题