赞
踩
描述:Jenkins配置项目链接托管平台报权限错误
Failed to connect to repository : Command "git.exe ls-remote -h -- git@gitee.com:XXXXXjenkins_test.git HEAD" returned status code 128:
stdout:
stderr: git@gitee.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
用SSH验证连接方法如下步骤
1、git生成私钥公钥:
git config --global user.name "用户名"
git config --global user.email "邮箱"
在c盘目录下git bash,ssh-keygen -t rsa 并按回车3下
git config --global --list
2、配置gitee的ssh私钥,此步骤忽略(代码托管平台教程均有此教程步骤)
3、Jenkins添加全局凭据 (全局凭据操作入口自行查询)
4、配置Jenkins的item源码管理,已经不报红表示正确配置源码URL和凭据
5、构建成功拉取代码
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。