threads / discuss / 18919

git & ssh on F10 server

Subject: git & ssh on F10 server

## tl;dr

9 messages between Apr 17, 2009 and Apr 18, 2009.

replies: 8people: 2as markdown or json

Aaron Gray· Apr 17, 2009, 15:56 UTC · lore
Hi,

we have a Fedora 10 server in SELinux enforcing mode setup running git-deamon and gitweb (with home grown SElinux policy).

Anyway now we find out you cannot do a 'push' over the basic git protocol, back to the server repository.

So now am trying to get git to work over ssh. The repositories are located /pub/git/*/.git

Basic attempts using BerliOS'es instructions for client end failed.
    http://developer.berlios.de/docman/display_doc.php?docid=1812&group_id=2
Could someone please help us with this.
Aaron
Julian Phillips· Apr 17, 2009, 16:19 UTC · re: Aaron Gray · lore

Re: git & ssh on F10 server

On Fri, 17 Apr 2009, Aaron Gray wrote:
Show 7 quoted lines
> Hi,
>
> we have a Fedora 10 server in SELinux enforcing mode setup running git-deamon 
> and gitweb (with home grown SElinux policy).
>
> Anyway now we find out you cannot do a 'push' over the basic git protocol, 
> back to the server repository.

You can push over git://, but you get no authentication mechanism so it's disabled by default. It's only really useful if you trust everyone who has IP access to the server.

Show 10 quoted lines
> So now am trying to get git to work over ssh. The repositories are located 
> /pub/git/*/.git
>
> Basic attempts using BerliOS'es instructions for client end failed.
>
>   http://developer.berlios.de/docman/display_doc.php?docid=1812&group_id=2
>
> Could someone please help us with this.
>
> Aaron

You haven't said what commands you tried, nor what the errors you received were, so it's a bit hard to say what went wrong ...

-- 
Julian

  ---
10.0 times 0.1 is hardly ever 1.0.
Julian Phillips· Apr 17, 2009, 17:17 UTC · lore

Re: git & ssh on F10 server

On Fri, 17 Apr 2009, Aaron Gray wrote:
> Julian,
>
> Thanks for the response.
Not a problem, but please keep the mailing list on the CC ...
Show 15 quoted lines
>>  On Fri, 17 Apr 2009, Aaron Gray wrote:
>> 
>> >  Hi,
>> > 
>> >  we have a Fedora 10 server in SELinux enforcing mode setup running 
>> >  git-deamon and gitweb (with home grown SElinux policy).
>> > 
>> >  Anyway now we find out you cannot do a 'push' over the basic git 
>> >  protocol, back to the server repository.
>>
>>  You can push over git://, but you get no authentication mechanism so it's
>>  disabled by default.  It's only really useful if you trust everyone who
>>  has IP access to the server.
>
> How do go about I enabling it ?

You have to enable the receive-pack service. You can either enable it for all repositories by using the --enable=<service> option to git-daemon, or on a per-repository basis by setting daemon.receivepack to true in the repositories that you want to enable push for.

Show 20 quoted lines
>> >  So now am trying to get git to work over ssh. The repositories are 
>> >  located /pub/git/*/.git
>> > 
>> >  Basic attempts using BerliOS'es instructions for client end failed.
>> > 
>> > 
>> >  http://developer.berlios.de/docman/display_doc.php?docid=1812&group_id=2
>> > 
>> >  Could someone please help us with this.
>> > 
>> >  Aaron
>>
>>  You haven't said what commands you tried, nor what the errors you received
>>  were, so it's a bit hard to say what went wrong ...
>> 
>
> git push ssh://ang@git.site.org/pub/git/llvm/trunk milestone1
> Pushing to ssh://ang@git.site.org/pub/git/llvm/trunk
> fatal:  exec ssh failed.
> fatal:  The remote end hung up unexpectedly

Sounds like git didn't find ssh on your path. What version of git is this btw?

Show 9 quoted lines
> A clone failed simularly
>
> I was expecting it to ask for a password. Should I try a DSA certificate ?
>
> Thanks,
>
> Aaron
>
>
-- 
Julian

  ---
"It's my cookie file and if I come up with something that's lame and I like it,
it goes in."
-- karl (Karl Lehenbauer)
Aaron Gray· Apr 17, 2009, 18:00 UTC · re: Julian Phillips · lore

Re: git & ssh on F10 server

Show 29 quoted lines
> On Fri, 17 Apr 2009, Aaron Gray wrote:
>
>> Julian,
>>
>> Thanks for the response.
>
> Not a problem, but please keep the mailing list on the CC ...
>
>>>  On Fri, 17 Apr 2009, Aaron Gray wrote:
>>>
>>> >  Hi,
>>> >
>>> >  we have a Fedora 10 server in SELinux enforcing mode setup running 
>>> > git-deamon and gitweb (with home grown SElinux policy).
>>> >
>>> >  Anyway now we find out you cannot do a 'push' over the basic git 
>>> > protocol, back to the server repository.
>>>
>>>  You can push over git://, but you get no authentication mechanism so 
>>> it's
>>>  disabled by default.  It's only really useful if you trust everyone who
>>>  has IP access to the server.
>>
>> How do go about I enabling it ?
>
> You have to enable the receive-pack service.  You can either enable it for 
> all repositories by using the --enable=<service> option to git-daemon, or 
> on a per-repository basis by setting daemon.receivepack to true in the 
> repositories that you want to enable push for.
Thanks, I'll make a note of that.
Show 25 quoted lines
>>> >  So now am trying to get git to work over ssh. The repositories are 
>>> > located /pub/git/*/.git
>>> >
>>> >  Basic attempts using BerliOS'es instructions for client end failed.
>>> >
>>> >
>>> > 
>>> > http://developer.berlios.de/docman/display_doc.php?docid=1812&group_id=2
>>> >
>>> >  Could someone please help us with this.
>>> >
>>> >  Aaron
>>>
>>>  You haven't said what commands you tried, nor what the errors you 
>>> received
>>>  were, so it's a bit hard to say what went wrong ...
>>>
>>
>> git push ssh://ang@git.site.org/pub/git/llvm/trunk milestone1
>> Pushing to ssh://ang@git.site.org/pub/git/llvm/trunk
>> fatal:  exec ssh failed.
>> fatal:  The remote end hung up unexpectedly
>
> Sounds like git didn't find ssh on your path.
> What version of git is this btw?
Yep. No ssh installed in Cygwin.
Thanks Julian, I am getting lax these days !
Aaron
Aaron Gray· Apr 18, 2009, 15:12 UTC · re: Julian Phillips · lore

Re: git & ssh on F10 server

Show 22 quoted lines
> On Fri, 17 Apr 2009, Aaron Gray wrote:
>>>  On Fri, 17 Apr 2009, Aaron Gray wrote:
>>>
>>> >  Hi,
>>> >
>>> >  we have a Fedora 10 server in SELinux enforcing mode setup running 
>>> > git-deamon and gitweb (with home grown SElinux policy).
>>> >
>>> >  Anyway now we find out you cannot do a 'push' over the basic git 
>>> > protocol, back to the server repository.
>>>
>>>  You can push over git://, but you get no authentication mechanism so 
>>> it's
>>>  disabled by default.  It's only really useful if you trust everyone who
>>>  has IP access to the server.
>>
>> How do go about I enabling it ?
>
> You have to enable the receive-pack service.  You can either enable it for 
> all repositories by using the --enable=<service> option to git-daemon, or 
> on a per-repository basis by setting daemon.receivepack to true in the 
> repositories that you want to enable push for.
Okay I have added the following to 'config' :-
[daemon]
        receivepack = true
and done an 'service xinetd restart' just in case, probably not needed.

I have tried a 'git push git://.../repo' but it is hanging, btw I am using Cygwin on the client, and F10 on the server.

Trying to clone an empty repository also hangs. btw I have sucessfully cloned big repositories.

Aaron
Show 45 quoted lines
>>> >  So now am trying to get git to work over ssh. The repositories are 
>>> > located /pub/git/*/.git
>>> >
>>> >  Basic attempts using BerliOS'es instructions for client end failed.
>>> >
>>> >
>>> > 
>>> > http://developer.berlios.de/docman/display_doc.php?docid=1812&group_id=2
>>> >
>>> >  Could someone please help us with this.
>>> >
>>> >  Aaron
>>>
>>>  You haven't said what commands you tried, nor what the errors you 
>>> received
>>>  were, so it's a bit hard to say what went wrong ...
>>>
>>
>> git push ssh://ang@git.site.org/pub/git/llvm/trunk milestone1
>> Pushing to ssh://ang@git.site.org/pub/git/llvm/trunk
>> fatal:  exec ssh failed.
>> fatal:  The remote end hung up unexpectedly
>
> Sounds like git didn't find ssh on your path.
> What version of git is this btw?
>
>> A clone failed simularly
>>
>> I was expecting it to ask for a password. Should I try a DSA certificate 
>> ?
>>
>> Thanks,
>>
>> Aaron
>>
>>
>
> -- 
> Julian
>
>  ---
> "It's my cookie file and if I come up with something that's lame and I 
> like it,
> it goes in."
> -- karl (Karl Lehenbauer) 
Julian Phillips· Apr 18, 2009, 15:34 UTC · re: Aaron Gray · lore

Re: git & ssh on F10 server

On Sat, 18 Apr 2009, Aaron Gray wrote:
Show 33 quoted lines
>>  On Fri, 17 Apr 2009, Aaron Gray wrote:
>> > >   On Fri, 17 Apr 2009, Aaron Gray wrote:
>> > > 
>> > > >   Hi,
>> > > > 
>> > > >  we have a Fedora 10 server in SELinux enforcing mode setup running 
>> > > >  git-deamon and gitweb (with home grown SElinux policy).
>> > > > 
>> > > >  Anyway now we find out you cannot do a 'push' over the basic git 
>> > > >  protocol, back to the server repository.
>> > > 
>> > >  You can push over git://, but you get no authentication mechanism so 
>> > >  it's
>> > >   disabled by default.  It's only really useful if you trust everyone 
>> > >   who
>> > >   has IP access to the server.
>> > 
>> >  How do go about I enabling it ?
>>
>>  You have to enable the receive-pack service.  You can either enable it for
>>  all repositories by using the --enable=<service> option to git-daemon, or
>>  on a per-repository basis by setting daemon.receivepack to true in the
>>  repositories that you want to enable push for.
>
> Okay I have added the following to 'config' :-
>
> [daemon]
>        receivepack = true
>
> and done an 'service xinetd restart' just in case, probably not needed.
>
> I have tried a 'git push git://.../repo' but it is hanging, btw I am using 
> Cygwin on the client, and F10 on the server.

What output do you get? What version of git are you using (client and server)?

Do you get any output logged by the git daemon?
> Trying to clone an empty repository also hangs. btw I have sucessfully cloned 
> big repositories.
>
> Aaron
-- 
Julian

  ---
Yes, but every time I try to see things your way, I get a headache.
Aaron Gray· Apr 18, 2009, 15:58 UTC · re: Julian Phillips · lore

Re: git & ssh on F10 server

Show 39 quoted lines
> On Sat, 18 Apr 2009, Aaron Gray wrote:
>
>>>  On Fri, 17 Apr 2009, Aaron Gray wrote:
>>> > >   On Fri, 17 Apr 2009, Aaron Gray wrote:
>>> > >
>>> > > >   Hi,
>>> > > >
>>> > > >  we have a Fedora 10 server in SELinux enforcing mode setup 
>>> > > > running git-deamon and gitweb (with home grown SElinux policy).
>>> > > >
>>> > > >  Anyway now we find out you cannot do a 'push' over the basic git 
>>> > > > protocol, back to the server repository.
>>> > >
>>> > >  You can push over git://, but you get no authentication mechanism 
>>> > > so it's
>>> > >   disabled by default.  It's only really useful if you trust 
>>> > > everyone who
>>> > >   has IP access to the server.
>>> >
>>> >  How do go about I enabling it ?
>>>
>>>  You have to enable the receive-pack service.  You can either enable it 
>>> for
>>>  all repositories by using the --enable=<service> option to git-daemon, 
>>> or
>>>  on a per-repository basis by setting daemon.receivepack to true in the
>>>  repositories that you want to enable push for.
>>
>> Okay I have added the following to 'config' :-
>>
>> [daemon]
>>        receivepack = true
>>
>> and done an 'service xinetd restart' just in case, probably not needed.
>>
>> I have tried a 'git push git://.../repo' but it is hanging, btw I am 
>> using Cygwin on the client, and F10 on the server.
>
> What output do you get?
None.
>  What version of git are you using (client and server)?
Server: F10
        git is version 1.6.0.6
        git-daemon 1.6.0.6-3.fc10.i386
Client: Cygwin
        git is version 1.6.1.2
> Do you get any output logged by the git daemon?

I dont seem to have logging on at all. How do I enable it ? I am running git-daemon via xinetd

Aaron
Show 10 quoted lines
>> Trying to clone an empty repository also hangs. btw I have sucessfully 
>> cloned big repositories.
>>
>> Aaron
>
> -- 
> Julian
>
>  ---
> Yes, but every time I try to see things your way, I get a headache. 
Aaron Gray· Apr 18, 2009, 18:07 UTC · re: Julian Phillips · lore

push git: failing

I am trying to get git to do a remote push, but it is intermittent, hanging sometimes, and not working others :-

    Aaron Gray@AMD2500-PC /usr/src/test/gittest/hello-world
    $ git push git://git.***/hello-world
    Counting objects: 4, done.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 557 bytes, done.
    Total 3 (delta 1), reused 0 (delta 0)
    fatal: read error (Software caused connection abort)
Server: F10
        git is version 1.6.0.6
        git-daemon 1.6.0.6-3.fc10.i386
Client: Cygwin
        git is version 1.6.1.2

/var/log/messages :- Apr 18 18:18:28 *** xinetd[29002]: START: git pid=3083 from=::ffff:212.19.110.144 Apr 18 18:18:28 *** git-daemon: [3083] Connection from 212.159.110.144:6008 Apr 18 18:18:28 *** git-daemon: [3083] Extended attributes (25 bytes) exist <host=git.***.org> Apr 18 18:18:29 *** git-daemon: [3083] Request receive-pack for '/hello-world' Apr 18 18:18:29 *** xinetd[29002]: EXIT: git status=0 pid=3083 duration=1(sec)

Aaron

← back to recent threads