代码之家  ›  专栏  ›  技术社区  ›  Zaks

Travis错误存储库无法从远程存储库读取

  •  1
  • Zaks  · 技术社区  · 6 年前

    我的文件夹结构如下 rserver docker包含rserver的gitsubmodule

    git子模块(rserver docker)如下:

    [submodule "rserver"]   
    path = rserver  
    url = git@github.com:VInc/rserver.git
    

    特拉维斯的样子如下

    before_install:
      - echo $CI_USER_TOKEN
      - echo -e "\n\nmachine github.com\n login $CI_USER_TOKEN\n" >>~/.netrc
      - git submodule update --init --recursive
    

    CI\u USER\u TOKEN是在Travis设置中更新的个人访问令牌

    我得到的错误如下

     $ git clone --depth=50 --branch=dev git@github.com:VInc/rserver-docker.git VInc/rserver-docker
    Cloning into 'VInc/rserver-docker'...
    Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
    $ cd VInc/rserver-docker
    $ git checkout -qf d445f5afe71a6f3390345842644e600ee4bbb68b
    7.47s$ git submodule update --init --recursive
    Submodule 'rserver' (git@github.com:VInc/rserver.git) registered for path 'rserver'
    Cloning into '/home/travis/build/VInc/rserver-docker/rserver'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.
    fatal: clone of 'git@github.com:VInc/rserver.git' into submodule path '/home/travis/build/VInc/rserver-docker/rserver' failed
    Failed to clone 'rserver'. Retry scheduled
    Cloning into '/home/travis/build/VInc/rserver-docker/rserver'...
    ERROR: Repository not found.
    
    2 回复  |  直到 6 年前
        1
  •  3
  •   Édouard Lopez    6 年前

    Git cannot clone my Submodules #

    git@github.com:someuser/somelibrary.git
    

    https://github.com/someuser/somelibrary.git
    
        2
  •  2
  •   Zaks    6 年前

    个人访问令牌出现问题,因为它没有克隆代码的权限