someteam / acha

Git Achievements
http://acha-acha.co
Eclipse Public License 1.0
466 stars 33 forks source link

Support SSH URL #20

Closed shanbin closed 9 years ago

shanbin commented 9 years ago

Fix java.net.URISyntaxException: Illegal character in scheme name at index 3: git@hostname:foo/bar.git

avasenin commented 9 years ago

Did you test this? URISyntaxException was fixed in 54c875d72dcb3068b61509095d568d040ad0b58c You branch add condition to resolve redirects for such URLs. This cause MailformedUrlException when I tried to add repo like git@hostname:foo/bar.git

shanbin commented 9 years ago

Hmm, I was seeing #10 without matching git@, only http and https would work.

After this change, git@ URL also works in my local build.

avasenin commented 9 years ago

The issue with git@ was in normalising uri method. We tried to construct URI object for scheme less uri and got URISyntaxException. See 54c875d72dcb3068b61509095d568d040ad0b58c. Please check git@ urls on the latest master. In you code you add rule to resolve redirect for SSH repos additionally to http/https. I have no idea how it could work. If you sure that your code is correct then you could write test for this case. Thanks,

shanbin commented 9 years ago

Got it, thanks a lot.

I was using the prebuilt 0.2.4 jar (de477071dd77dd26504fee0e18fa1869b6c4fd75), well current master works perfectly.