ssh - 如何将 SSH 密钥添加到本地 CircleCI 构建?
问题描述
我正在尝试通过运行在本地运行 CircleCI 测试作业
circleci local execute --job test
但是,我收到此错误消息:
go: github.com/some/repo@v0.0.0-20180921204022-800easdf7ec: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/52f8e69c46f5a1cc77e6bf: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
我基本上想为本地 CircleCI 环境做相当于https://circleci.com/docs/2.0/add-ssh-key/的操作,但是没有办法去项目设置-> 如上所述检查 SSH 密钥在那个文档中。我已阅读https://circleci.com/docs/2.0/local-cli/#run-a-job-in-a-container-on-your-machine上的文档,但找不到方法去做这个。
知道如何在本地 CircleCI 环境中从私有 Github 存储库中查看代码吗?
解决方案
您是否尝试过将密钥添加到您的 SSH 钥匙串?
ssh-add (location of ssh key)
这应该将它添加到钥匙串和 CircleCI 本地应该拿起它。
推荐阅读
- java - 当我尝试生成签名的 apk 时出现错误
- powershell - 从批处理文件运行 Powershell 命令以重命名网络驱动器
- python - 在正则表达式中仅选择特定数字
- sublimetext3 - 如何使用 emacs pro Essentials 插件进行单词跳转和单词删除的行为就像常规的 sublime 单词跳转和删除一样
- html - ng服务一次时如何防止自动重新加载页面?
- python - 使用 ssl 在 Freebsd 11 上安装 Python 3.7
- java - `flux`/`mono`、RabbitMQ、AkkaStream 在微服务世界的大局中是如何工作的?
- ios - 如何在 xamarin ios 中有浮动标签文本框
- ios - 将一个 Int 与另一个 Int 列表进行比较,以查看 Int 是否在 Int 列表中,以避免大量 if 语句
- list - 此应用程序发明者代码将生成什么输出?