gitlab ci失败,找不到远程项目

bcs8qyzn  于 2023-05-15  发布在  Git
关注(0)|答案(1)|浏览(197)

差不多一个月了,我一直在纠结这个问题。我就是解决不了...我的gitlab CI pipeline失败了,总是出现同样的错误,说我的一个repo找不到了。

The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_can_port/' not found
fatal: clone of 'https://gitlab-ci-token:[MASKED]@gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_can_port' into submodule path '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_can_port' failed
Failed to clone 'src/lib/x2_can_port'. Retry scheduled

我所有的子模块都是用相对url添加的,它们都在同一个gitlab服务器上,它们都是私有的,我拥有所有这些仓库。
所有这些子模块之间的唯一区别是,一些子模块有一个主分支(x2_can_port和x2_logger),而所有其他子模块都有一个主分支。
当然,当我在本地克隆项目时,它工作得非常好。
在这里,你可以找到我的gitlab ci文件,还有我的git子模块文件
非常感谢你的帮助
致上,
奥利维尔

stages:
  - build
  - style
 
build:
  stage: build
  image: gitlab-registry.in2p3.fr/xemis/xemis_2/logiciel/x2_calibration
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
    GIT_SUBMODULE_DEPTH: 1
  script:
    - pwd
    - whoami
    - mkdir build
    - cd build
    - cmake326 ..
    - cmake326 --build . -j8
 
style:
    stage: style
    image: gitlab-registry.in2p3.fr/xemis/xemis_2/logiciel/x2_calibration
    artifacts:
      untracked: false
      when: on_failure
      expire_in: '1 yrs'
      paths: 
        - "result_clang_tidy.yaml"
    script:
      - mkdir build
      - cd build
      - cmake326 ..
      - cmake326 --build . -j8
      - cd .. 
      - find src/ -iname "*.[ch]xx" | xargs  clang-tidy -p=build --config-file=_clang-tidy --quiet --export-fixes=result_clang_tidy.yaml
      - if [ -s "result_clang_tidy.yaml" ]; then exit 1; else exit 0; fi
[submodule "src/lib/serial_port"]
    path = src/lib/serial_port
    url = ../bibliotheques/serial_port
[submodule "src/lib/x2_can_port"]
    path = src/lib/x2_can_port
    url = ../bibliotheques/x2_can_port
[submodule "src/lib/x2_data_reader"]
    path = src/lib/x2_data_reader
    url = ../bibliotheques/x2_data_reader
[submodule "src/lib/x2_logger"]
    path = src/lib/x2_logger
    url = ../bibliotheques/x2_logger
[submodule "src/lib/x2_magic_number_generator"]
    path = src/lib/x2_magic_number_generator
    url = ../bibliotheques/x2_magic_number_generator
[submodule "src/lib/x2_shaper_board_interface"]
    path = src/lib/x2_shaper_board_interface
    url = ../bibliotheques/x2_shaper_board_interface
[submodule "src/lib/x2_timestamp_generator"]
    path = src/lib/x2_timestamp_generator
    url = ../bibliotheques/x2_timestamp_generator
[submodule "src/lib/x2_udp_data_logger"]
    path = src/lib/x2_udp_data_logger
    url = ../x2_udp_data_logger
[submodule "extern/doxygen-awesome-css"]
    path = extern/doxygen-awesome-css
    url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "src/lib/x2_daq_configuration"]
    path = src/lib/x2_daq_configuration
    url = ../bibliotheques/x2_daq_configuration
[submodule "src/lib/agilent_33250a"]
    path = src/lib/agilent_33250a
    url = ../bibliotheques/agilent_33250a
Running with gitlab-runner 15.11.0 (436955cb)
  on ccosvmse0035@gitlab.in2p3.fr 8de310f4, system ID: s_4e9381db672c
  feature flags: FF_NETWORK_PER_BUILD:true
Preparing the "docker" executor
00:04
Using Docker executor with image gitlab-registry.in2p3.fr/xemis/xemis_2/logiciel/x2_calibration ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image gitlab-registry.in2p3.fr/xemis/xemis_2/logiciel/x2_calibration ...
Using docker image sha256:874e7054f18eb8e4498a9d2f3bb740797cb8d31b285130e10052ac081eac38bd for gitlab-registry.in2p3.fr/xemis/xemis_2/logiciel/x2_calibration with digest gitlab-registry.in2p3.fr/xemis/xemis_2/logiciel/x2_calibration@sha256:3c159d96d63a20ea2dadb0b69e473bb6a46b085286cdf3c1d0a9a9cadefe5941 ...
Preparing environment
00:02
Running on runner-8de310f4-project-19755-concurrent-0 via ccosvmse0035...
Getting source from Git repository
00:04
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/xemis/xemis_2/logiciel/x2_calibration/.git/
Checking out 50092f1b as detached HEAD (ref is feature_calibration_zc_th)...
Updating/initializing submodules recursively with git depth set to 1...
Synchronizing submodule url for 'extern/doxygen-awesome-css'
Synchronizing submodule url for 'src/lib/agilent_33250a'
Synchronizing submodule url for 'src/lib/serial_port'
Synchronizing submodule url for 'src/lib/x2_can_port'
Synchronizing submodule url for 'src/lib/x2_daq_configuration'
Synchronizing submodule url for 'src/lib/x2_data_reader'
Synchronizing submodule url for 'src/lib/x2_logger'
Synchronizing submodule url for 'src/lib/x2_magic_number_generator'
Synchronizing submodule url for 'src/lib/x2_shaper_board_interface'
Synchronizing submodule url for 'src/lib/x2_timestamp_generator'
Synchronizing submodule url for 'src/lib/x2_udp_data_logger'
Entering 'extern/doxygen-awesome-css'
Entering 'src/lib/agilent_33250a'
Entering 'src/lib/serial_port'
Entering 'src/lib/x2_daq_configuration'
Entering 'src/lib/x2_data_reader'
Entering 'src/lib/x2_magic_number_generator'
Entering 'src/lib/x2_shaper_board_interface'
Entering 'src/lib/x2_timestamp_generator'
Entering 'src/lib/x2_udp_data_logger'
Entering 'extern/doxygen-awesome-css'
HEAD is now at 245c7c9 update license file
Entering 'src/lib/agilent_33250a'
HEAD is now at 1bcc6fc fix: typo dans le cmakelists
Entering 'src/lib/serial_port'
HEAD is now at 2ebbccc refactor: suppression de tous les messages sur stdout
Entering 'src/lib/x2_daq_configuration'
HEAD is now at ae86f04 refatctor: suppression des messages sur stdout
Entering 'src/lib/x2_data_reader'
HEAD is now at 2ef502a refactor: changement de nom fonction charge
Entering 'src/lib/x2_magic_number_generator'
HEAD is now at e0e9da4 ops: structuration sous forme de bibliothèque
Entering 'src/lib/x2_shaper_board_interface'
HEAD is now at ab64bf4 ops: réorganisation sous forme d'une bibliothèque
Entering 'src/lib/x2_timestamp_generator'
HEAD is now at 06b0b34 ops: structuration sous forme d'un bibliothèque
Entering 'src/lib/x2_udp_data_logger'
HEAD is now at 1d33d3c fix: ajout header et template
Cloning into '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_can_port'...
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_can_port/' not found
fatal: clone of 'https://gitlab-ci-token:[MASKED]@gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_can_port' into submodule path '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_can_port' failed
Failed to clone 'src/lib/x2_can_port'. Retry scheduled
Cloning into '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_logger'...
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_logger/' not found
fatal: clone of 'https://gitlab-ci-token:[MASKED]@gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_logger' into submodule path '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_logger' failed
Failed to clone 'src/lib/x2_logger'. Retry scheduled
Cloning into '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_can_port'...
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_can_port/' not found
fatal: clone of 'https://gitlab-ci-token:[MASKED]@gitlab.in2p3.fr/xemis/xemis_2/logiciel/bibliotheques/x2_can_port' into submodule path '/builds/xemis/xemis_2/logiciel/x2_calibration/src/lib/x2_can_port' failed
Failed to clone 'src/lib/x2_can_port' a second time, aborting
Cleaning up project directory and file based variables
00:02
ERROR: Job failed: exit code 1

我希望解决这个问题,并了解问题的根源。

km0tfn4u

km0tfn4u1#

我在repos中发现我的ci无法克隆以下参数

settings -> CI/CD -> allow access to this project with a CI_JOB_TOKEN -> add an existing project to the scope.

我添加了我的主要项目库网址到这个设置在所有的项目,不能被克隆,现在它的工作... gitlab版本是15.10。可能是一个在早期版本的gitlab中不存在的参数。奥利维尔

相关问题