Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345416

Summary: [server][git]Unauthorized exception for git operations is not handled well
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Malgorzata Janczarska CLA 2011-05-11 09:18:00 EDT
Tying to push to read-only repository throws TransportException that is wrapped with JGitInternalException with a very generic message. We should return an error with 403 HttpStatus and proper message. Client should use this status to redisplay the login prompt.

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command
	at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:158)
	at org.eclipse.orion.server.git.servlets.PushJob.doPush(PushJob.java:81)
	at org.eclipse.orion.server.git.servlets.PushJob.run(PushJob.java:115)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: https://gotom@github.com/gotom/gotom.git: not authorized
	at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:446)
	at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:365)
	at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
	at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
	at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:154)
Comment 1 Malgorzata Janczarska CLA 2011-05-11 11:46:06 EDT
This applies only to http connections.
Comment 2 Malgorzata Janczarska CLA 2011-05-12 07:10:26 EDT
Hopefully it should work now.