-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TF401027: You need the Git 'PullRequestContribute' permission to perform this action #35
Comments
Hi @icharleston, Could you check this #28 (comment) and this #31 (comment)? Kind regards, |
Hi @shayki5 , Thanks for your response! I will check it out. I have a new error but my work email in AZDO is correct. 2020-04-07T06:25:18.2603151Z ##[error]{"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: |
Where you put your email, in the reviewers? |
Yes! - [email protected]; I have allowed "contribute to pull request" all user groups. 2020-04-07T06:25:17.1679024Z The Source Branch is: refs/heads/dev |
Without reviewers, is it works or still got a permissions error? |
Without reviewers. I got the error below... 2020-04-07T09:48:27.7667026Z ##[error]{"$id":"1","innerException":null,"message":"TF401027: You need the Git 'PullRequestContribute' permission to perform this action. Details: identity 'Build\8ea776f8-44ff-4a9c-acaf-5a0b6553bf20', scope 'repository'.","typeName":"Microsoft.TeamFoundation.Git.Server.GitNeedsPermissionException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitNeedsPermissionException","errorCode":0,"eventId":3000} Where to add this "system.debug = true" ? Thanks! |
@icharleston did you try to add the "Project Collection Build Service" user to the “Project Collection Build Service Accounts” security group? |
Thanks! |
@icharleston Yes, in the release pipeline, you have "variables" tab. can you see it? |
Hi @shayki5 I am trying to create a pull request in another project from the other project pipeline. My Job is running in XYZ and trying to create a pull request in ABC. I have done the below
I am getting the same error above mentioned. please do the need full. For your reference: Below is the debug error after "post"
Thanks, |
@krishnamohan1 Can you give me permissions to your organization? |
Hi @shayki5 - it is in my client network I cannot provide access to the organization. Any suggestion for your end? |
Hi, @shayki5- I replicate the same error in my local trail azure instance, Do let me know your id. I will provide access to you and let me know the best time I will also connect with you Thanks, |
Hi @krishnamohan1, my id is: [email protected] |
@shayki5 I invited you to my organisation and provided the required access. Have sent an email I live in Melbourne, Australia |
@shayki5 Thanks a ton for your time. The issue has been resolved in both my local and Client organisation. Normally people will face this error in below scenarios
Problem 1: When you try to create a pull request with your automated job within the project. if you face "PullRequestContribute" permission error. Solution: if you face this error means you have already executed a job. Problem 2: When you try to create a pull request with your automated Job from one project to another project and you face "PullRequestContribute" permission error. Solution: Now you have to go to your organization settings. it is not related to your project setting anymore. Note: "xxxxxxxx" is your name or organization name. I suggest using this troubleshooting. it will resolve your issues. I have tested in both build and release pipeline. it worked perfectly. Now I am going to test this to one organization to another organization. Hope it will work!!:) The issue is ready to closeThanks, |
Thank you so much for the detailed explanation! |
@krishnamohan1 OMG! Thank you for sharing the outcome! I have been scratching my head for so long trying to figure this out with a different task! |
Hi,
I used your PR as a task in our Pipeline and I have encountered error below.
I have followed the Azure DevOps Repository guide.
Only thing I did NOT setup is this yml since I don't know where to add it. I can't update your yaml in the release.
env:
System_AccessToken: $(System.AccessToken)
2020-04-06T22:36:18.4039154Z Task : Create Pull Request
2020-04-06T22:36:18.4039594Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-04-06T22:36:18.4040045Z Version : 1.2.84
2020-04-06T22:36:18.4040266Z Author : Shayki Abramczyk
2020-04-06T22:36:18.4040651Z Help : More Information
2020-04-06T22:36:18.4041114Z ==============================================================================
2020-04-06T22:36:19.4683155Z The Source Branch is: refs/heads/dev
2020-04-06T22:36:19.4684950Z The Target Branch is: refs/heads/master
2020-04-06T22:36:19.4692491Z The Title is: Create Pull Request from Dev to Master
2020-04-06T22:36:19.4693197Z The Description is: Automatically create a Pull Request from dev to master after successful deployment
2020-04-06T22:36:19.4731382Z Is Draft Pull Request: False
2020-04-06T22:36:20.0406138Z ##[error]{"$id":"1","innerException":null,"message":"TF401027: You need the Git 'PullRequestContribute' permission to perform this action. Details: identity 'Build\8ea776f8-44ff-4a9c-acaf-5a0b6553bf20', scope 'repository'.","typeName":"Microsoft.TeamFoundation.Git.Server.GitNeedsPermissionException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitNeedsPermissionException","errorCode":0,"eventId":3000}
2020-04-06T22:36:20.0898548Z ##[section]Finishing: Create Pull Request
Thank you very much! Looking forward for your response!
Cheers,
Charleston
The text was updated successfully, but these errors were encountered: