Azure pipeline does't allow to git push throwing 'GenericContribute' permission is needed

Channa picture Channa · Jun 11, 2019 · Viewed 7.4k times · Source

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

steps:
- script: |
   git config user.email [email protected]
   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:

enter image description here

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?

Answer

Shayki Abramczyk picture Shayki Abramczyk · Jun 11, 2019

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

enter image description here