Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I'm trying to install the package from a private Azure DevOps repository using the pip install command, but I'm encountering an error

  • I am able to successfully clone the repository using the git clone command, whether using the SSH protocol or the HTTPS protocol.

  • I am able to successfully install using the command pip install "git+https://<repository_https_url>".

  • When I try to install using the command pip install "git+ssh://<repository_ssh_url>",
    I get the error message:

    MEDevel.com: Open-source for Healthcare and Education

    Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

    Visit Medevel


pip install "git+ssh://<repository_ssh_url>"

Collecting git+ssh://****@ssh.dev.azure.com:v3/\*\*\*\*/LindeUtils
  Cloning ssh://****@ssh.dev.azure.com:v3/\*\*\*\*/LindeUtils to c:\users\\*\*\*\*\temp\pip-req-build-_o7f2wcb
  Running command git clone --filter=blob:none --quiet 'ssh://****@ssh.dev.azure.com:v3/\*\*\*\*/LindeUtils' 'C:\Users\\*\*\*\*\Temp\pip-req-build-_o7f2wcb'
  ssh: Could not resolve hostname ssh.dev.azure.com:v3: Name or service not known
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  error: subprocess-exited-with-error

I’m trying to use repository_https_url instead of repository_ssh_url

pip install "git+ssh://<repository_https_url>"

Collecting git+ssh://****@dev.azure.com/\*\*\*\*/LindeUtils
  Cloning ssh://****@dev.azure.com/\*\*\*\*/LindeUtils to c:\users\*\*\*\*\temp\pip-req-build-a_xjd47o
  Running command git clone --filter=blob:none --quiet 'ssh://****@dev.azure.com/\*\*\*\*/LindeUtils' 'C:\Users\\*\*\*\*\Temp\pip-req-build-a_xjd47o'
  ssh: connect to host dev.azure.com port 22: Network is unreachable
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  error: subprocess-exited-with-error

Could you help me analyze the problem?

>Solution :

ssh: Could not resolve hostname ssh.dev.azure.com:v3: Name or service not known

The cause of the issue is that the azure repo ssh url used in pip install command has issue.

To solve this issue, we need to change the : before v3 as /.

For example:

pip install git+ssh://git@ssh.dev.azure.com/v3/{Org}/{Project}/{RepoName}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading