3
votes

I am facing an issue on Azure Data Factory when I try to access the Azure DevOps Git Repository that I configured. The error message is: "Invalid GIT configuration. You need to gain access to the repository before you can publish any changes. Details: Authentication error - you do not have access to the provided Azure DevOps account."

I am using the same account on both DevOps and Data Factory. My Azure portal access is "Contributor" at the subscription level and my DevOps role is Project Administrator on the project.

Regards, Tania

I've tried various combinations of creating the repository as new from Data Factory as well as using an existing one created (by myself) in Azure DevOps.

From https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles in the Open Feedback items a user mentions that "the Build-in role Data Factory Contributor this is not in Allow part: Action:Microsoft.DataFactory/locations/configureFactoryRepo/action" I investigated the the contributor role and it appears to have the Action allowed as "Read" ?

ADF Repo Settings

ADF Repo Error

4
According to your error message, this should be the issue which relevant with your git configuration in ADF and the permission setting in VSTS. In fact, contributor permission has been enough to do most of actions. For me, if my role is contributor and member in org, I can publish pipeline, create branch and pr. You'd better share the screenshots of your configuration in ADF git setting. - Merlin Liang - MSFT
I have added a screen snip of the settings used. I agree that Contributor role should be enough to perform actions against the repository. - taniaw

4 Answers

2
votes

Problem scenario: Azure developer wanted to make an update to the Azure data factory. When connected to the data factory, he got this issue of “Invalid Git Configuration”.

Issue: Invalid GIT configuration. You need to gain access to the repository before you can publish any changes.

Solution (that resolved the primary issue): Azure DevOps admin added “user account” into Azure DevOps “Organization setting” using “Basic” license.

Steps –

  1. Go to Azure DevOps (Root)
  2. Organization settings (bottom left)
  3. On the left navigation tree, “General” heading, Click Users.
  4. Check user (having connection problem) exist in there with “Basic” Access Level. If not, add the user in here.

Details – In my case, developer credentials did exist in AAD, and permission was granted across except at Organization settings.

Copy from:https://pyaarey.wordpress.com/2020/11/18/azure-data-factory-showing-invalid-git-configuration-error/

1
votes

After the detailed message shared from @taniaw, this issue caused by the account confused.

Here has 2 accounts, [email protected], and [email protected].

When login to azure portal with [email protected], and configure the Azure Devops Git. It's all correct. Now, the issue is when go Azure Devops Git tab after the repos configured successfully, its access account used in the backend changed into [email protected]. But this account does not has permission to access the organization and repos. That's why when click the Azure Devops Git tab, it is grey and receiving the error message "You do not access to the repository".

These detailed message can all be viewed by Fiddler. Everyone can use fiddler trace to know the exactly error caused then analyze it.

At last, the solution is this is the account mapping confused issue which need Azure Account Team support.

0
votes

This issue was resolved today. The cause was a different Azure DevOps tenant where my account had been added as a guest had used an email account instead of my Azure AD account and this caused the confusion when passing credentials from Azure Data Factory to Azure DevOps. The issue was resolved by leaving the organization that had my user mis-configured as I'm no longer actively working on that project. A better solution may have been to have their Azure AD administrator update my guest account to the correct details.

0
votes

Verify the User configuration at Organization level: The default is "Stakeholder" - it should be "Basic" actually. Hope it is useful.