Are you having trouble with conencting Gearset to Azure DevOps?
When trying to load the repositories with Azure DevOps Git, do you receive the following error message.
Is Gearset is only able to show some, but not other, Azure organizations, and therefore you cannot access the repo you want? This document troubleshoots the common problems we see.
Cause 1 - Does your repo have a default branch?
We have seen repositories without a
Default branch, that causes a problem with retrieval. In this screenshot the
master branch is the default - please check your repo has one too.
If your repo does have a default branch, the API response (see cause 4 =) to
should have a the parameter
"defaultBranch":"refs/heads/<branch name>". If it does not, we need to set a default branch.
Set a branch (usually
main) as default.
Cause 2 - Are you connected to the right tenant?
If you have multiple tenants in Azure DevOps, it is likely that that Gearset has been connected to the wrong one, and therefore can't load the repositories you expect. Gearset will give you the error:
"Gearset can't find any repositories. Either create one or update your security settings in Azure DevOps to grant access"
Alternatively, if you are using Pipelines, Gearset could be showing you a banner that says:
Pull requests can't be loaded and some of the pipeline functionality won't be available to you, please ask the owner for access.
To verify if you have multiple tenants, you can review it in the drop-down of your account's settings. To access this go to
User settings and click on
Then click on the link to the
Azure DevOps Profile Page :
Here you can review your tenants in the drop-down, make sure you have the right tenant selected.
(Note: If you do not have multiple tenants, it is possible that your repo type is not git-based. Gearset only supports Git repo types, and not other types such as TFVC. If your repo is not a Git repo type, you will need to create a new Git-based repo.)
To resolve this, you need to:
Switch your Azure DevOps to the correct tenant profile.
In Gearset, delete the connection to Azure DevOps.
Log out of Gearset to clear the cached credentials.
Log into Gearset again and connect to Azure DevOps again. When you get the integration pop up, you can make sure that the part of the account / tenant in the parenthesis is correct.
You may need to log into an incognito window of your web browser to get the option to enter your desired Azure DevOps login details.
Cause 3: Can Gearset authenticate with OAuth?
If your Azure organization has not given permission for third-party access with OAuth Gearset will not be able to retrieve repository data.
This will result in the error upon connection
In Azure DevOps navigate to your
Organization settingsand in the left-hand menu click "Policies".
Make sure that
Third-party application access via OAuthis toggled to
This should allow you to see the right repositories that you are looking for.
Cause 4 - Can the API access the expected repos?
Check if you can access the list of repos via the API call in the URL to see what Gearset is able to see.
Start with this HTTP query in your browser to find the <publicAlias> value
Then use this query to request for the <accountName>
Finally, use this <accountName> to request for the list of repos available:
This can verify which repos are expected to show up in Gearset.