首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在satis存储库中使用本地存储库

在satis存储库中使用本地存储库
EN

Stack Overflow用户
提问于 2018-08-26 07:06:01
回答 1查看 564关注 0票数 6

我有一个服务器,在其中我有几个git存储库和一个satis存储库设置。我想设置satis存储库来列出本地repos。

代码语言:javascript
复制
// 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时,它挂起在以下行,并且不再继续。

代码语言:javascript
复制
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请求它时,我得到了以下错误。

代码语言:javascript
复制
[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中,这样他们就可以克隆自己的存储库。

EN

回答 1

Stack Overflow用户

发布于 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

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52021918

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档