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

Bug 311313

Summary: Doesn't honour push urls when pushing
Product: [Technology] EGit Reporter: Chris West (Faux) <eclipse>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.8.0   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Chris West (Faux) CLA 2010-05-02 12:06:28 EDT
Build Identifier: I20100413-1521

EGit 0.7.1

Git lets you set a different url to use when pushing a remote.

> git --version
git version 1.7.0.2.msysgit.0

> git remote set-url --push origin git+ssh://me@ssh.foo.com/home/me/bar.git

> git remote -v
origin  git://git.foo.com/git/bar.git (fetch)
origin  git+ssh://me@ssh.foo.com/home/me/bar.git (push)


EGit doesn't pick this up and tries to push to "origin" as git://git.foo.com/git/bar.git.  This fails as the repo isn't writeable over git://:
Can't Connect: Can't connect to any URI: git://git.foo.com/git/bar.git (Transport error occurred during push operation: git://git.foo.com/git/bar.git: push not permitted).

The push (obviously) works as expected if you manually enter the push url into the "Custom URI" page during the push.

Reproducible: Always

Steps to Reproduce:
1. Set a git repo to have a different fetch and push url for any remote.
2. Attempt to push the repo from EGit.
3. Observe as the push is attempted on the fetch url.
Comment 1 Chris West (Faux) CLA 2010-05-02 13:00:08 EDT
Like bug 311315, also fixed in 0.8.0.201004301514.

*** This bug has been marked as a duplicate of bug 304182 ***