pip install from a gitosis
Asked Answered
B

2

7

I have working gitosis repo. If I do

git clone git@server:repo.git

it clones the repo correctly. However, it does not work if I do:

git clone ssh://git@server:repo.git

Cloning into repo...
ssh: connect to host  port 22: Connection refused
fatal: The remote end hung up unexpectedly

The problem is that when I use pip I I do:

pip install git+ssh://git@server:repo.git

and of course yields:

Cloning into repo...
ssh: connect to host  port 22: Connection refused
fatal: The remote end hung up unexpectedly

If I want to do:

pip install git+git@server:repo.git 

I get

ValueError: ('Expected version spec in', 'git+git@server:repo.git', 'at', '+git@server:repo.git')

Is there a way to have pip or gitosis configured so I can make it work?

Thanks,

(please avoid 'use gitolite', I would if I could)

Broadax answered 22/3, 2012 at 7:20 Comment(0)
M
8

I would rather use the ssh uri syntax (rather than the SCP syntax)

git clone git+ssh://git@server/repo.git
Mesopause answered 23/3, 2012 at 7:46 Comment(1)
To anyone looking at this and thinking, "That IS what I did!", notice that after server there is a / rather than a :. This is what I needed to change from my usual syntax in order to get pip to work correctly.Vladivostok
B
0

To install, you should only have to run:

pip install git+git://host/path_to_repo/repo.git

So for your example:

pip install git+git://server/path_to_repo/repo.git
Beverage answered 11/6, 2012 at 20:24 Comment(2)
I cannot do it like this. I need to access via ssh.Broadax
Sorry, just re-read your original post. I actually think it might be a firewall issue, as git uses different ports to ssh. What happens if you do a ssh -T to your server, are you able to connect?Beverage

© 2022 - 2024 — McMap. All rights reserved.