在尝试在 CircleCI 中构建项目时,我收到以下错误:
Either git or ssh (required by git to clone through SSH) is not installed in the image. Falling back to CircleCI's native git client but the behavior may be different from official git. If this is an issue, please use an image that has official git and ssh installed. Cloning git repository
error cloning repository: repository not found
这会导致构建失败。
最佳答案
这是我解决问题的方法:
问题在于,设置该项目的工程师设置了特定于他的部署 key 和用户 key 离开了公司,因此他无法访问公司的 GitHub 存储库项目被撤销,这使得 Circle CI 中项目的现有部署 key 和用户 key 变得过时。
我所要做的就是:
- 转至项目设置
- 然后SSH key
- 删除现有的部署 key 和用户 key (如果有)
- 添加新的部署 key
- (可选 - 不需要)添加新的用户 key (通过 GitHub 授权)
此后,我能够在 Circle CI 中成功构建项目
关于github - 圆圈 CI : error cloning repository: repository not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74004701/