Skip to main content
Troubleshooting Azure DevOps connection

Does your Azure DevOps connection give the error "Gearset can't find any repositories"?

Valerio Chang avatar
Written by Valerio Chang
Updated over a month ago

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:
"Gearset can't find any repositories. Either create one or update your security settings in Azure DevOps to grant access."

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 below) to

https://<accountName>.visualstudio.com/_apis/git/repositories?api-version=1.0

should have a the parameter "defaultBranch":"refs/heads/<branch name>". If it does not, we need to set a default branch.

Resolution

Set a branch (usually master or 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 Profile :

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.

Resolution

To resolve this, you need to:

  1. In Azure DevOps, revoke the Gearset application authorisation on all tenant profiles.

  2. Switch your Azure DevOps to the correct tenant profile.

  3. In Gearset, delete the connection to Azure DevOps.

  4. Log out of Gearset to clear the cached credentials.

  5. 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, and you may see below error message:


"Azure DevOps authorization error
A problem occurred while authorizing with AzureDev Ops.
An unknown error occurred. Please contact support if you need assistance with this issue."

Resolution

  1. In Azure DevOps navigate to your Organization settings and in the left-hand menu click Policies.

  2. Make sure that Third-party application access via OAuth is toggled to On.


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

https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=1.0

Then use this query to request for the <accountName>

https://app.vssps.visualstudio.com/_apis/Accounts?memberId=<publicAlias>&api-version=1.0

Finally, use this <accountName> to request for the list of repos available:

https://<accountName>.visualstudio.com/_apis/git/repositories?api-version=1.0

This can verify which repos are expected to show up in Gearset.

"Problem getting user account information from Azure DevOps"? Ensure that the ADO account currently logged in on your web browser

Sometimes, you may come across this error message when you're trying to add an Azure account:

"Problem getting user account information from Azure DevOps. Ensure that ADO account currently logged in on your web browser is a member of an ADO organisation"

Users have reported this error message happening after they've successfully connected their ADO account (for the first time), then removed the connection in their Gearset app, and tried to re-connect.

Resolution

1. Make sure that in the browser where you have your Gearset app open, you're not logged into a different Azure account than the account you're trying to connect to in our app.

Particularly, if you have more than one tenant for the Azure account you're trying to connect.

2. If you've already tried to connect your Azure account on a different browser, or while using Incognito mode, or after clearing cache and re-logging into Gearset on your current browser - please, move to step 3.

3. Is the third-party application via OAuth enabled in your Azure Organization Settings under Security > Policies?

  • If not, make sure this setting is enabled and try to re-connect your Azure account in Gearset.

  • If the setting is enabled, try to revoke it on your Azure account, re-enable it, and then try to re-connect the ADO account in our app. We believe this may help resolve your issue.

If none of the above steps helps you resolve your Azure connection issue, please contact us in the in-app chat for further guidance.

Did this answer your question?