mschonaker / wagon-git

Git Wagon for Apache Maven
http://synergian.github.io/wagon-git/
83 stars 31 forks source link

git remote add origin <url> failed. #18

Closed opoo closed 10 years ago

opoo commented 10 years ago

Execute git remote add origin <url> failed when I use GitHub for Windows with this plugin.

In GitBackend.java

if (!run("remote", new String[] { "add", "origin", remote }))
    throw new GitException("git remote failed");

This works for me.

if (!run("remote", new String[] { "add", "origin", remote })){
    log.warn("git remote add failed, try git remote set-url");
    if(!run("remote", new String[] { "set-url", "origin", remote })){
        throw new GitException("git remote failed");
    }
}
mschonaker commented 10 years ago

Thank you so much.

mschonaker commented 10 years ago

Released in version 0.2.1. Thanks.