Gazler / githug

Git your game on!
MIT License
6.86k stars 1.03k forks source link

Level 15 on CentOS #144

Closed michaelwnelson closed 10 years ago

michaelwnelson commented 10 years ago

I'm on CentOS 6.4 and installed git-all, ruby, and rubygems with yum. On level 15, I provided the proper solution 'git push origin --tags', however when attempting to solve the level githug returns the following:

usage: git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>] <repository> <refs>...
Sorry, this solution is not quite right!

I noticed in levels/push_tags.rb the solution runs the following command:

repo.git.raw_git_call("git ls-remote --tags -q", repo.git.git_file_index).

I'm not sure why the command doesn't resolve correctly on CentOS, but I know it works fine on my Ubuntu box.

On my Ubuntu box on level 15, just running git ls-remote returns:

$ git ls-remote
From /tmp/d20131127-8696-jyaftd/.git/
acab266df4b736c799f0d9ca0c6021a9e6719e0b        HEAD
acab266df4b736c799f0d9ca0c6021a9e6719e0b        refs/heads/master

Obviously on the CentOS box git ls-remote fails, but I do see a directory under /tmp/d20131126-24127-sdkraf

Maybe on the CentOS box githug is having trouble finding or reading that directory?

If there is any other information I can provide to be helpful please let me know.

Gazler commented 10 years ago

@michaelwnelson - apologies for the late response.

I had a look on CentOS and it did work for me - could you please let me know which version of git you have installed? I'll try and build a docker image that matches the environment.

michaelwnelson commented 10 years ago

@Gazler

Not a problem! My git version is 1.7.1

Gazler commented 10 years ago

@michaelwnelson - it looks like git ls-remote --tags -q . instead of git ls-remote --tags -q works, I'll try it out properly in a bit.

michaelwnelson commented 10 years ago

Hmm, git ls-remote --tags -q . didn't seem to work for me. However, the following does seem to work:

$ git ls-remote --tags ./.
6767e8a0df0cf9980fd789cd2ff9e77de42353e1        refs/tags/tag_to_be_pushed

Found that from git ls-remote --help under Examples. Sorry I didn't think to look around for that sooner.

Gazler commented 10 years ago

@michaelwnelson I have just checked and come to the same conclusion. It looks like everything works without the -q flag.

Could you just confirm git ls-remote --tags . works? It did inside my docker image.

michaelwnelson commented 10 years ago

@Gazler yes, git ls-remote --tags . does work.