I have access to a specific (internal) gitlab repo which I can clone, (having configured my ssh key on the server):
git clone git@mygitlabserver:mynamespace/myproject.git
However, when trying to directly install via pip a specific artifact from a tag:
pip install git+ssh://mygitlabserver:mynamespace/[email protected]#egg=myartifact
I get a password prompt.
I have also tried the following:
pip install git+ssh://atemporaryTOKENofmine@mygitlabserver:mynamespace/[email protected]#egg=myartifact
pip install git+ssh://oauth2:atemporaryTOKENofmine@mygitlabserver:mynamespace/[email protected]#egg=myartifact
pip install git+ssh://gitlab-ci-token:atemporaryTOKENofmine@mygitlabserver:mynamespace/[email protected]#egg=myartifact
Any suggestions?
edit: the proposed duplicate does not resolve my issue cause it is not the case of a passphrase-protected key, but rather than a wrong url used.
Thanks to @nils-werner for resolving it (check accepted answer)
You're mixing two kinds of URLs:
git@mygitlabserver:mynamespace/myproject.git
Is equivalent to
ssh://git@mygitlabserver/mynamespace/myproject.git
whereas you tried (note the missing username and incorrectly used colon)
ssh://mygitlabserver:mynamespace/myproject.git
This means the correct pip command is
pip install git+ssh://git@mygitlabserver/mynamespace/[email protected]#egg=myartifact
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With