Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Pushing to Gerrit using http

For me it also works with JGit. 

In both JGit and EGit we hit TransportHttp 356

				final int status = HttpSupport.response(conn);

But there are differences in authentication in JGit/EGit use case:
In JGit, authentication is triggered by the JVM. In EGit, its done by TransportHttp.
The traffic in both cases looks different:

JGit
=====

Authorization: Digest 
response="5e389867e32242afbe771408fd5ceb39", 
cnonce="OMKHNFLJJMMJPEDOEJBOFFJMKLAJPCBGLKADJNEC", 
username="jensbaumgart", 
nc=00000001, 
realm="Gerrit Code Review", 
qop="auth"
nonce="Fm0JsxkL0/3aArnML1C9Yxm1CFFp3ySSdrsx0g==$", 

uri="/r/p/egit.git/info/refs?service=git-receive-pack", 
algorithm="MD5", 

HTTP/1.1 200 OK

EGit
=====

Authorization: Digest 
response="f25055d02049181251c547a6458093e1", 
cnonce="CMf0pZNvCds=", 
username="jensbaumgart", 
nc="00000001", 
realm="Gerrit Code Review", 
qop="auth", 
nonce="+ai8BPbOZjIBocDxpcY/7IBJuY0japsMgMff0Q==$", 
domain="http://egit.eclipse.org/r/p/";

Accept: application/x-git-receive-pack-advertisement, */*
Cache-Control: no-cache
Host: localhost:1999
Connection: keep-alive

HTTP/1.1 403 Forbidden

--Jens


-----Original Message-----
From: Shawn Pearce [mailto:spearce@xxxxxxxxxxx] 
Sent: Donnerstag, 9. Dezember 2010 19:05
To: Baumgart, Jens
Cc: Matthias Sohn; egit-dev@xxxxxxxxxxx
Subject: Re: [egit-dev] Pushing to Gerrit using http

On Thu, Dec 9, 2010 at 9:55 AM, Baumgart, Jens <jens.baumgart@xxxxxxx> wrote:
> I used the password from the settings page but got the following error:
>
> Transport error occurred during push operation:
> http://jensbaumgart@xxxxxxxxxxxxxxxx/r/p/egit.git: git-receive-pack not
> permitted

Seems to be working OK for me with C Git and JGit on the command line:

$ ./jgit push http://spearce@xxxxxxxxxxxxxxxx/r/p/egit.git master
Username for http://spearce@xxxxxxxxxxxxxxxx/r/p/egit.git/info/refs?service=git-receive-pack:
spearce
Password:
To http://spearce@xxxxxxxxxxxxxxxx/r/p/egit.git
 ! [rejected]        master -> master (non-fast forward)

Something is odd about EGit.

-- 
Shawn.


Back to the top