Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358475 - need push access via https for tycho project
Summary: need push access via https for tycho project
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 14:59 EDT by Jan Sievers CLA
Modified: 2011-09-22 11:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Sievers CLA 2011-09-21 14:59:34 EDT
Since I am working from behind a corporate firewall which blocks ssh, I need push access via https for git repository

https://<committerId>@git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git

I read http://wiki.eclipse.org/Git#Setting_up_https_for_pushing as well as bug 326992.

when trying to push via above URL I get two (!) password prompts followed by error:

error: Cannot access URL https://jsievers@git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git/, return code 22
fatal: git-http-push failed

(using msysgit 1.7.6-preview20110708)

I get the same error both from behind the corporate firewall (http.proxy configured) as well as from home (no firewall/http proxy)

I guess push access via https needs to be enabled on the server for this repo?

BTW I verified that I can login using committerId and password to https://dev.eclipse.org/portal/
Comment 1 Eclipse Webmaster CLA 2011-09-21 15:47:33 EDT
Done.

-M.
Comment 2 Jan Sievers CLA 2011-09-22 04:00:44 EDT
(In reply to comment #1)
now I get a different error:

$ git push origin HEAD:master
Password:
Counting objects: 3661, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2706/2706), done.
error: RPC failed; result=22, HTTP code = 403
fatal: The remote end hung up unexpectedly
Writing objects: 100% (3661/3661), 12.06 MiB | 4.48 MiB/s, done.
Total 3661 (delta 1135), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: expected ok/error, helper said '2004�1� �\Ϲ�.$.2��JIj��E����nn#�3�=►iYb̜���Xh��♫��4���o��:�n`�▼�y[�8ҍ;►�z'

fatal: write error: Broken pipe


HTTP 403 seems to indicate I have some access permission problem.
Comment 3 Eclipse Webmaster CLA 2011-09-22 10:27:19 EDT
Well the only matching errors I can find in the logs are:

155.56.68.217 - - [22/Sep/2011:03:43:12 -0400] "POST /gitroot/tycho/org.eclipse.tycho.git/git-receive-pack HTTP/1.1" 403 - "-" "git/1.7.6.msysgit.0"
155.56.68.217 - - [22/Sep/2011:03:45:00 -0400] "POST /gitroot/tycho/org.eclipse.tycho.git/git-receive-pack HTTP/1.1" 403 - "-" "git/1.7.6.msysgit.0"

And based on other successful pushed it looks like yours aren't correctly identifying themselves(missing userid).

Did you 'restart' your git connection?  I'm wondering if your client(or the server) is saving some now out of date state information.

-M.
Comment 4 Jan Sievers CLA 2011-09-22 10:56:01 EDT
(In reply to comment #3)
> Well the only matching errors I can find in the logs are:
> 
> 155.56.68.217 - - [22/Sep/2011:03:43:12 -0400] "POST
> /gitroot/tycho/org.eclipse.tycho.git/git-receive-pack HTTP/1.1" 403 - "-"
> "git/1.7.6.msysgit.0"
> 155.56.68.217 - - [22/Sep/2011:03:45:00 -0400] "POST
> /gitroot/tycho/org.eclipse.tycho.git/git-receive-pack HTTP/1.1" 403 - "-"
> "git/1.7.6.msysgit.0"
> 
> And based on other successful pushed it looks like yours aren't correctly
> identifying themselves(missing userid).
> 
> Did you 'restart' your git connection?  I'm wondering if your client(or the
> server) is saving some now out of date state information.
> 
> -M.

tried again exactly the same thing and now it works.
Whatever the reason was.

BTW setting up https for push shouldn't be such a hassle IMHO.

I can only speak for the 20+ eclipse committers from SAP but it's rather common to be working from behind a corporate firewall. Why is this not enabled by default? github seems to have no problems with it.

It would be good to document this on http://wiki.eclipse.org/Git#Setting_up_https_for_pushing 

For example the initial error 

"Cannot access URL [...] return code 22"

does not hint at the fact that actually

"push via https is not enabled"

If a better error message is not feasible at least an entry on the wiki page explaining the error code would be nice.
Comment 5 Eclipse Webmaster CLA 2011-09-22 11:14:56 EDT
(In reply to comment #4)

> Why is this not enabled by default? github seems to have no problems with it.

Because in order for this to work the Web server user needs write access to your repo, and as a rule letting the webserver write things presents a security/safety risk.  So we like to make sure projects understand the potential risk before we turn this feature on. 

> It would be good to document this on
> http://wiki.eclipse.org/Git#Setting_up_https_for_pushing 

I've added a line indicating that HTTPS is inactive by default.

-M.