在 Jenkins中配置github credential 认证信息

Jenkins中的git 信息出现红字报错,如下图
Please make sure you have the correct access rights and the repository exists(翻译:请确保您拥有正确的访问权限,并且存储库存在)

解决方法:
需要配置github credential 认证信息,步骤如下:

  1. 进入Credentials → Global Credentials

  2. Add Credentials 添加新的信任配置,选择类型: SSH Username with private key

  3. 利用命令创建一套新的秘钥: ssh-keygen -t rsa -C “your_email@example.com”

  4. 将私有秘钥注册到jenkins ,看下图:

  5. 将对应公有秘钥注册到git项目

  6. 然后任务中的Git连接警告就会消除

1 个赞