francoiscabrol / gitmaster

Tool for managing a set of git repositories (display status, fetch, ...)
http://francoiscabrol.github.io/project/gmaster.html
GNU General Public License v3.0
10 stars 3 forks source link

gmaster dump can not handle remote url #6

Closed bodograumann closed 5 years ago

bodograumann commented 5 years ago

I‘m not quite sure, what exactly the problem is, but when I run gmaster dump --level 2 with a repository pointing to a remote of the form

ssh://git@my.git.server:1022/some/repo/dir

it gives the error:

[ERROR] app-hq: com.francoiscabrol.gitmaster.git.GitCmdError: Impossible to parse the remote url of app-hq

It could be because of the non-standard ssh-port. The remotes git@github.com:bodograumann/mu-repo.git and https://github.com/OpenAPITools/openapi-generator.git do work.

francoiscabrol commented 5 years ago

ok thank you for reporting the issue. I will try to reproduce

bodograumann commented 5 years ago

It really seems to be a general problem. I’m sorry that I can’t help in debugging as I don’t know scala.

This is how to easily reproduce the problem:

curl https://raw.githubusercontent.com/francoiscabrol/gitmaster/master/install.sh | GITMASTER_PATH=./ bash -x
git clone https://github.com/francoiscabrol/gitmaster.git
./gmaster

Output:

 | gitmaster No remote
francoiscabrol commented 5 years ago

Thank you for your help! it should not be hard to fix. i will try this weekend

bodograumann commented 5 years ago

This feels a little awkward, but the problem is still there with the above example… Could you please have another look, if you find the time?

Happy holidays :-)

francoiscabrol commented 5 years ago

I think there were two problems.

francoiscabrol commented 5 years ago

what do you get if go into your gitmaster folder and you run git remote get-url origin? you should get the remote url https://github.com/francoiscabrol/gitmaster.git

bodograumann commented 5 years ago

Yes I do:

$ git remote get-url origin                                                                                                                                     
https://github.com/francoiscabrol/gitmaster.git

Maybe it depends on the software version…

$ java-config -L                                                                                                                                                
The following VMs are available for generation-2:                                                                                                                                            
*)      IcedTea JDK 3.9.0 [icedtea-bin-8]

 $ git --version                                                                                                                                                 
git version 2.18.1

I also created a new unix user to make sure that no git settings are interfering. The result was the same.

francoiscabrol commented 5 years ago

ok... I guess the versions are good and if you get the good output for git remote get-url origin I don't see why it does not work :/ Are you sure you are using the last gmaster version?

there is also something that I don't understand: in your first comment

It could be because of the non-standard ssh-port. The remotes git@github.com:bodograumann/mu-repo.git and https://github.com/OpenAPITools/openapi-generator.git do work.

you said that it was working with https://* remote urls... so what changed after?

francoiscabrol commented 5 years ago

oh I reproduced the issue with an other computer!

francoiscabrol commented 5 years ago

git changed its output recently 'Your branch is up-to-date' is now 'You branch is up to date' :/

bodograumann commented 5 years ago

Wow, good catch! I was really tearing at my hair about this one. Now it works :-)