* Setting up Git Server over SSH
@ 2010-11-15 18:20 Dennis
2010-11-15 18:38 ` Shawn Pearce
0 siblings, 1 reply; 5+ messages in thread
From: Dennis @ 2010-11-15 18:20 UTC (permalink / raw)
To: git
I have a remote server (hostname.com) that acts as a webserver.
What I did is I wanted to set up my public_html folder as a public
repository.
After trial and error I am still at stage_0.
Thus, on that server I have /home/user/.git directory and the repo works
fine if I am accessing it from the server.
Now, I want to clone that repo onto my local machine.
I am doing this, but it fails:
>git clone ssh://hostname.com:/home/user/.git
Cloning into user...
fatal: protocol error: bad line length character: logi
>Access denied
Access denied
Access denied
Access denied
Access denied
Access denied
FATAL ERROR: Server sent disconnect message
type 2 (protocol error):
"Too many authentication failures for "
--------------------------------
What can I do to make it work?
Dennis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting up Git Server over SSH
2010-11-15 18:20 Setting up Git Server over SSH Dennis
@ 2010-11-15 18:38 ` Shawn Pearce
2010-11-15 19:14 ` Dennis
0 siblings, 1 reply; 5+ messages in thread
From: Shawn Pearce @ 2010-11-15 18:38 UTC (permalink / raw)
To: Dennis; +Cc: git
On Mon, Nov 15, 2010 at 10:20 AM, Dennis <dennisfm@friendlymatch.com> wrote:
> I am doing this, but it fails:
>
>> git clone ssh://hostname.com:/home/user/.git
>
> Cloning into user...
> fatal: protocol error: bad line length character: logi
This looks to me like your server is echoing back text upon login.
That text is being confused for Git protocol data by the Git client,
but its not as expected, so it aborts with an error message.
Try getting the simple case to work first:
ssh hostname.com echo hello
This should *only* print "hello". If it prints anything else (and
right now I suspect it prints "login ..."), that will confuse Git.
You need to adjust your server's shell login scripts to stop echoing
information during a non-interactive shell. Or you may need to adjust
your SSH client to ensure the authentication proceeds smoothly. Those
"Access denied" errors look like you aren't actually authenticating to
the server.
--
Shawn.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting up Git Server over SSH
2010-11-15 18:38 ` Shawn Pearce
@ 2010-11-15 19:14 ` Dennis
2010-11-16 10:46 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 5+ messages in thread
From: Dennis @ 2010-11-15 19:14 UTC (permalink / raw)
To: Shawn Pearce; +Cc: git
Thanks, that worked
I used OpenSSH instead of Putty
and that fixed things up.
Dennis
----- Original Message -----
From: "Shawn Pearce" <spearce@spearce.org>
To: "Dennis" <dennisfm@friendlymatch.com>
Cc: <git@vger.kernel.org>
Sent: Monday, November 15, 2010 1:38 PM
Subject: Re: Setting up Git Server over SSH
> On Mon, Nov 15, 2010 at 10:20 AM, Dennis <dennisfm@friendlymatch.com>
> wrote:
>> I am doing this, but it fails:
>>
>>> git clone ssh://hostname.com:/home/user/.git
>>
>> Cloning into user...
>> fatal: protocol error: bad line length character: logi
>
> This looks to me like your server is echoing back text upon login.
> That text is being confused for Git protocol data by the Git client,
> but its not as expected, so it aborts with an error message.
>
> Try getting the simple case to work first:
>
> ssh hostname.com echo hello
>
> This should *only* print "hello". If it prints anything else (and
> right now I suspect it prints "login ..."), that will confuse Git.
> You need to adjust your server's shell login scripts to stop echoing
> information during a non-interactive shell. Or you may need to adjust
> your SSH client to ensure the authentication proceeds smoothly. Those
> "Access denied" errors look like you aren't actually authenticating to
> the server.
>
> --
> Shawn.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting up Git Server over SSH
2010-11-15 19:14 ` Dennis
@ 2010-11-16 10:46 ` Ævar Arnfjörð Bjarmason
2010-11-17 2:25 ` Dennis
0 siblings, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-11-16 10:46 UTC (permalink / raw)
To: Dennis; +Cc: Shawn Pearce, git
On Mon, Nov 15, 2010 at 20:14, Dennis <dennisfm@friendlymatch.com> wrote:
> I used OpenSSH instead of Putty
> and that fixed things up.
Does using Putty with this at the top of your .bashrc fix it too:
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Setting up Git Server over SSH
2010-11-16 10:46 ` Ævar Arnfjörð Bjarmason
@ 2010-11-17 2:25 ` Dennis
0 siblings, 0 replies; 5+ messages in thread
From: Dennis @ 2010-11-17 2:25 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: Shawn Pearce, git
I reinstalled git package with putty and it worked okay this time.
It did print this line though before normal output:
stdin: is not a tty
remote: Counting objects: 1194, done.
...
I tweaked bash setting and it did not seem to do anything. But then I am on
Windows XP, so not sure if it will work the same way or if I edited the
right file.
Dennis
----- Original Message -----
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: "Dennis" <dennisfm@friendlymatch.com>
Cc: "Shawn Pearce" <spearce@spearce.org>; <git@vger.kernel.org>
Sent: Tuesday, November 16, 2010 5:46 AM
Subject: Re: Setting up Git Server over SSH
> On Mon, Nov 15, 2010 at 20:14, Dennis <dennisfm@friendlymatch.com> wrote:
>> I used OpenSSH instead of Putty
>> and that fixed things up.
>
> Does using Putty with this at the top of your .bashrc fix it too:
>
> if [[ $- != *i* ]] ; then
> # Shell is non-interactive. Be done now!
> return
> fi
>
> ?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-11-17 2:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 18:20 Setting up Git Server over SSH Dennis
2010-11-15 18:38 ` Shawn Pearce
2010-11-15 19:14 ` Dennis
2010-11-16 10:46 ` Ævar Arnfjörð Bjarmason
2010-11-17 2:25 ` Dennis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).