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.

SSH dependency does not work

See original GitHub issue

Issue

I cannot use the git+ssh://... syntax for specifying a private repository requirement. When I try adding it, I get:

➜ poetry add ssh://git@github.com:slhck/ffmpeg-bitrate-stats.git

[ValueError]
Could not parse version constraint: //git@github.com:slhck/ffmpeg-bitrate-stats.git

When I want to install it, I get:

➜ poetry install
Updating dependencies
Resolving dependencies... (0.0s)

[CalledProcessError]
Command '['git', 'clone', 'ssh://git@github.com:slhck/ffmpeg-bitrate-stats.git', '/tmp/pypoetry-git-ffmpeg-bitrate-statsllzoo8d6']' returned non-zero exit status 128.

This specification is valid for requirements.txt and is needed to resolve private keys before installation.

Also, the solution suggested here (https://github.com/python-poetry/poetry/issues/1964#issuecomment-580803549) does not work:

➜ poetry add git+ssh://git@github.com:slhck/ffmpeg-bitrate-stats.git

Updating dependencies
Resolving dependencies... (0.0s)

[CalledProcessError]
Command '['git', 'clone', 'ssh://git@github.com:slhck/ffmpeg-bitrate-stats.git', '/tmp/pypoetry-git-ffmpeg-bitrate-stats8jwupxi9']' returned non-zero exit status 128.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
slhckcommented, Mar 16, 2020

As mentioned, I need to use SSH in order to resolve the private key when accessing the repository. This is in an automated build step, and using HTTP credentials is not possible.

0reactions
slhckcommented, Mar 16, 2020

Hey @finswimmer – that’s true, it works now.

But pip, according to its documentation:

currently supports cloning over git, git+http, git+https, git+ssh, git+git and git+file

So, I thought I could use the explicit protocol specifiers. I guess that is not possible for the time being, as ssh:// URLs (described here: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) are not correctly parsed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

apt-get dependency issue Open-SSH Client - Ask Ubuntu
Save this question. This is on an Ubuntu 12.04 Server. Various attempts to fix it with lack of background knowledge failed, e.g.
Read more >
problem with install dependency over ssh connection
I connected my github account successfully. When I hit create button at the end of setup pages, everything looks normal. I don't have...
Read more >
SBT doesn't use ssh-based resolver to resolve dependency
After updating to sbt 0.13, I can use my private repo by adding the following line to build.sbt resolvers += Resolver.ssh("Company Maven Repo", ......
Read more >
Question - nodejs ssh dependencies key not work - Plesk Forum
In the File-Manager "/home_directory/. ssh" i installed the private key but it does not work.
Read more >
Troubleshoot SSH issues | Bitbucket Cloud - Atlassian Support
If your SSH agent doesn't know to offer Bitbucket a key, the connection fails. You may run into this issue if you've recently...
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