Nic*_*n16 6 git composer-php satis
我有一台服务器,我有一些git 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/"
}
Run Code Online (Sandbox Code Playgroud)
当我运行它时,bitbucket git repo被成功访问和更新,但是当满意地构建本地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
Run Code Online (Sandbox Code Playgroud)
我已经尝试使用../../repo/test-repo.git,并/var/repo/test-repo.git用于回购网址.当我这样做时,构建成功完成,但当我尝试使用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.
Run Code Online (Sandbox Code Playgroud)
虽然,它确实引用了最新的提交哈希,所以我知道它至少成功地获取了repo,但是似乎并没有访问数据.
我怎么能这样做?任何帮助表示赞赏.
JFYI git是一个用户并拥有自己的ssh密钥,这些密钥被添加到authorized_users他们可以克隆自己的repo.
sac*_*_ur -1
您好,请确保您正在运行正确的命令和路径
然后在路径下休耕
请转到您的存储库路径 ( C:\wamp\www\nj16\nicholasjohn16\vendor\NicholasJohn16\test-repo)
并初始化空存储库
git init
然后设置一个你想要的遥控器
git remote add composer github-url
然后根据需要添加一个分支
git branch slave
然后结帐到从属分支
然后使用
注1:请逐一运行即可知道故障原因
注意2:请重新检查您正在运行的命令
注3:跟随我的脚步
| 归档时间: |
|
| 查看次数: |
372 次 |
| 最近记录: |