git - 在 satis 存储库中使用本地存储库
问题描述
我有一台服务器,其中有一些 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。
解决方案
嗨,请确保您正在运行正确的命令和路径
然后在路径下方休耕
请转到您的回购路径(C:\wamp\www\nj16\nicholasjohn16\vendor\NicholasJohn16\test-repo
)
并初始化空存储库
git init
然后设置一个你想要的遥控器
git remote add composer github-url
然后根据需要添加一个分支
git branch slave
然后结帐到从分支
然后使用
注意1:请一个接一个运行然后你就会知道失败是什么
注意2:请重新检查您正在运行的命令
注3:放慢我的脚步
推荐阅读
- wordpress - 如何设置永久链接以在 wordpress 中获取所有带有父帖子的子自定义帖子?
- python-3.x - 如何使用 scikit-learn 选择最佳集群数量?
- selenium - Selenium::Remote::Driver:单击锚元素不起作用
- ios - 当手指从一个按钮拖动到下一个按钮时如何触发 UIButton 事件
- javascript - sencha 3.4 实际在哪里构建 html 结构?
- verilog - 在与同步信号沿相同的沿上进行串行数据传输的 verilog 代码
- python - 如何在 django 测试设置中创建 postgresql 扩展
- java - 在不实现 Comparable 接口的情况下,ArrayList 的对象如何使用 Collection.sort() 而不会出错?
- wysiwyg - Summernote 和 FPDF
- python - 创建唯一的字典键