question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

azure-devops extension unable to parse devops repos ssh urls to detect organization and project

See original GitHub issue

Summary

vsts build list does not work on valid git repository.

Steps to reproduce:

  1. take git repository from project defined at azure devops (ssh.visualstudio.com:v3/$org/$project/$repo)

  2. git clone repository to working directory

  3. cd to working directory

  4. run vsts build list and get the error ( see details below )

Workaround:

  1. 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

  1. 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
atbaggacommented, Jan 29, 2019

Fixed in Azure-Devops-Extension. Will be available in version 0.3.0

1reaction
atbaggacommented, Nov 30, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found