azure-devops extension unable to parse devops repos ssh urls to detect organization and project
See original GitHub issueSummary
vsts build list
does not work on valid git repository.
Steps to reproduce:
-
take git repository from project defined at azure devops (
ssh.visualstudio.com:v3/$org/$project/$repo
) -
git clone repository to working directory
-
cd to working directory
-
run
vsts build list
and get the error ( see details below )
Workaround:
- change
[remote "origin"] url
inside.git/config
from
$org@vs-ssh.visualstudio.com:v3/$org/$project/$repo
to
ssh://$org@vs-ssh.visualstudio.com:22/$org/$project/_ssh/$repo
- run
vsts build list
, now it succeeds
Details:
$ git pull
Already up-to-date.
$ vsts build list
--instance must be specified. The value should be the URI of your VSTS account, for example: https://<account>.visualstudio.com or your TFS project collection. You can set a default value by running: vsts configure --defaults instance=https://<account>.visualstudio.com. For auto detection to work (--detect on), you must be in a local Git directory that has a "remote" referencing a VSTS or TFS repository.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
azure-devops extension unable to parse devops repos ssh ...
Steps to reproduce: take git repository from project defined at azure devops ( ssh.visualstudio.com:v3/$org/$project/$repo ). git clone ...
Read more >Working with URLs in extensions - Azure DevOps
Learn about best practices for working with URLs in Azure DevOps ... of the organization URL can change over time; Avoid parsing a...
Read more >Repository mirroring - GitLab Docs
Create a repository mirror · On the top bar, select Main menu > Projects and find your project. · On the left sidebar,...
Read more >Git SSH public key authentication failed with git on Azure ...
I have done the following: Created a repo in Azure DevOps; Created a SSH key using git-bash, as per Microsoft's documentation, copied and...
Read more >Server Configuration - Atlantis
--allow-draft-prs; --allow-fork-prs; --allow-repo-config; --atlantis-url; --automerge ... Azure DevOps hostname to support cloud and self hosted instances.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in Azure-Devops-Extension. Will be available in version 0.3.0
@steveculshaw Thanks for the feedback! Glad that you could troubleshoot and figure out the issue.
As you already figured out, when inside a git directory, organization, project in the remote url takes precedence over set defaults (
vsts configure --defaults instance=<your org url> project=<your project name>
). This is the current behavior and my understanding is you do not have an issue with it.However your issue with confusion around which organization is being used seems valid, and can be resolved with documentation and better error message.