Azure管道不允许git push抛出"GenericContribute"权限 [英] Azure pipeline does't allow to git push throwing 'GenericContribute' permission is needed

查看:255
本文介绍了Azure管道不允许git push抛出"GenericContribute"权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 cmd 组件按如下方式推送在Azure管道中完成的一些更改,

 步骤:-脚本:|git config user.email you@you.comgit config user.name您的名字"git diffgit添加git commit -m版本更新[跳过ci]"git push origin HEAD:主 

但是它无法显示以下错误.

远程:0000000000aaTF41027:您需要Git'GenericContribute'执行此操作的权限.详细信息:身份'Build \ sdfdfjjkk',范围为存储库"

我已经按如下所示设置了必要的权限:

并且还启用了允许脚本访问OAuth令牌,如所述

I'm trying push some changes done during Azure pipeline using cmd component as follows,

steps:
- script: |
   git config user.email you@you.com
   git config user.name "your name"
   git diff
   git  add .
   git commit -m "version update [skip ci]"
   git push origin HEAD:master

But it fails showing following error.

remote: 0000000000aaTF41027: You need the Git 'GenericContribute' permission to perform this action. Details: identity 'Build\sdfdfjjkk', scope 'repository'

I already set the necessary permission as follows:

And the Allow scripts to access the OAuth token is also enabled as mentioned here

What other permissions do I need to give this to work?

解决方案

You need to grant the permissions to Project Collection Build Service (account name):

这篇关于Azure管道不允许git push抛出"GenericContribute"权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆