Gazler / githug

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

Final level does not work properly #107

Closed tyler569 closed 11 years ago

tyler569 commented 11 years ago

The final level ("contribute.rb") attempts to fork the github repository using SSH, this appears to not work, when running "githug" while on level 42 I get this error message:

********************************************************************************
*                                    Githug                                    *
********************************************************************************
Cloning repository to /tmp/githug
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Sorry, this solution is not quite right!
Don't forget you can type `githug hint` for a hint and `githug reset` to reset the current level
Gazler commented 11 years ago

I am surprised that the git clone levels worked in this instance.

Could you please run the following two commands and paste the output?

Command 1: ssh

git clone git@github.com:Gazler/githug.git

Command 2: https

git clone https://github.com/Gazler/githug.git
tyler569 commented 11 years ago
tyler@xutop:~/testdir$ git clone git@github.com:Gazler/githug.git
Cloning into 'githug'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

tyler@xutop:~/testdir$ git clone https://github.com/Gazler/githug.git
Cloning into 'githug'...
remote: Counting objects: 1711, done.
remote: Compressing objects: 100% (1037/1037), done.
remote: Total 1711 (delta 677), reused 1581 (delta 558)
Receiving objects: 100% (1711/1711), 250.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (677/677), done.
Checking connectivity... done
tyler@xutop:~/testdir$

I know that when I did the git clone levels I used https and it worked fine, seems like SSH is the problem.

In case there's a platform difference, I'm using command line git on Xubuntu 13.10

Gazler commented 11 years ago

That's good to know. The fix should be as simple as changing it to use the https protocol.

tyler569 commented 11 years ago

I'm not sure that will fully solve the problem, because in order to submit a pull request on github, one needs to fork the repository, and work on their own fork. Instructing users to clone your repo and then git push isn't going to work without your password - regardless of whether HTTPS or SSH is used. I propose a reworking of the level to point users to the website to fork the repo rather than a simple clone.

Gazler commented 11 years ago

@tyler569 - The solution for this level requires a valid (merged into the repo) contribution to the Githug project. The reason it clones is to iterate over the commits to check if you match as an author of one of the commits.

All that is failing in your case is the clone to see if you have any contributions because there is no SSH key set up.

Thanks.