linux - 致命:无法读取“https://gitlab.com”的用户名:gitlab 上没有这样的设备或地址
问题描述
我正在尝试通过自动部署和拉取过程将代码推送到生产服务器,但是在管道构建过程中出现这样的错误
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 登录到我的服务器并提取我更新的代码?
提前致谢
解决方案
推荐阅读
- javascript - 如何读取 NodeJS 流的数据而不会丢失?
- javascript - 如果我在 index.html 的脚本标记中使用异步,我是否需要费心在 scripts.js 中编写异步代码?我要javascript
- typescript - 如何使用 Firebase 函数运行 PostgreSQL 服务器?
- beautifulsoup - 如何 Web 抓取 SEC Edgar 10-K 动态数据
- ruby-on-rails - 即使提供记录 ID,也无法更新嵌套属性
- authentication - 如果未登录,重定向用户时如何在 URL 中发送目标参数?
- selenium - 夜班 - Saucelabs 问题
- flutter - 显示特定的星期并编辑列表中的一行
- python - 多任务分类CNN
- python - 有没有办法用python中的POST数据修复这个错误?