jenkins新增mavn构建任务,添加git提示,无法连接仓库(git ls-remote-h http://xxx.git HEAD return status code 128 … the requested URL returned error: 403)

本质上,jenkins构建机上的存储的当前账户权限不够,进去修改下有权限的就ok

env

  • git-v1.8.3.1
  • centos7.x

查看当前jenkins构建机

//查看.gitconfig配置
[weblogic@sy04 ~]$ cat ~/.git
.gitconfig        .git-credentials

[weblogic@sy04 ~]$ cat ~/.gitconfig 
[user]
	email = [email protected]
	name = jenkins_push
[push]
	default = simple

[credential]
	helper = store  //默认账户存储在~/.git-credentials

//确保当前记录的账户存在读取代码的权限
[weblogic@sy04 ~]$ cat ~/.git-credentials
xxxx

#link