linux - 致命: could not read Username for 'https://gitlab.com' : No such device or address on gitlab

标签 linux git continuous-integration gitlab devops

我尝试使用自动部署和 pull 过程将代码推送到生产服务器,但我在管道构建过程中遇到了这样的错误

fatal: could not read Username for 'https://gitlab.com': No such device or address

这是一个 .gitlab-ci.yml

script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- echo "$PRIVATE_KEY_STAGING" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh -p22 ec2-user@$SERVER_STAGING "uname -a"

如何登录我的服务器并使用 Gitlab CI/CD 提取更新的代码?

提前致谢

最佳答案

既然你解决了这个问题,不如在这里更好地描述一下你做了什么?

它可能对社区比简单的更有用

"solved, I use personal Access Token to pull my private repo"

😉

关于linux - 致命: could not read Username for 'https://gitlab.com' : No such device or address on gitlab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66561803/

相关文章:

linux - 除了内核线程堆栈之外,内核是否有自己的堆栈?

Git clean 过滤器 - 检索原始行,git smudge 但不是原始行

git - 在我使用 git reset 转到较旧的变更集后,如何返回到历史记录中的最后一次提交?

node.js - 如何从 bitbucket-pipelines.yml 进行 git push?

linux - sed:-e表达式#1,字符21:`s'的未知选项

linux - CRON bash 执行结果不同于手动启动

linux - 为什么我的计时器不是周期性的而是只过期一次?

git - 为多个 git 服务器配置 git 客户端

java - 指定组属性时 Gradle uploadArtifacts 失败

continuous-integration - MsTest 在文件夹中运行所有测试