Gitlab CI---could not read username for xxx: no such device or address

0 Preface/Foreword

项目开发中,经常会使用第三方的算法或者功能,那么就需要把对应的repo以子模块的方式添加到当前repo中。

添加命令

git submodule add  <URL>

1 问题表现

子模块添加成功,但是GitLab CI阶段,报错,错误内容:

 fatal: could not read username for xxx: no such device or address

2 解决方法

参考文档:Gitlab CI 拉取 submodules_gitlab ci submodule-CSDN博客 

 需要在repository下面添加deploy token,并在主repo中的.gitmodule中添加生成的token。

2.1 子模块生成deploy token 

Note:该令牌无法找回,而且只会显示一次,所以需要保存下来。

2.2 .gitmodule添加deploy token

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-29 07:22:06       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-29 07:22:06       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-29 07:22:06       82 阅读
  4. Python语言-面向对象

    2024-03-29 07:22:06       91 阅读

热门阅读

  1. python-numpy-常用函数详解

    2024-03-29 07:22:06       38 阅读
  2. 久菜盒子|毕业设计|金融|DCC-GARCH模型

    2024-03-29 07:22:06       42 阅读
  3. OpenCV图像滤波、边缘检测

    2024-03-29 07:22:06       37 阅读
  4. Redis缓存数据库表(列单独缓存)

    2024-03-29 07:22:06       40 阅读
  5. Spring Boot整合Redis

    2024-03-29 07:22:06       38 阅读
  6. 《青少年成长管理2024》 006 “成长需要教育”

    2024-03-29 07:22:06       43 阅读
  7. MyBatis3源码深度解析(二十七)MyBatis整合Spring框架

    2024-03-29 07:22:06       38 阅读
  8. 设计模式的主要分类

    2024-03-29 07:22:06       39 阅读