I have followed these instructions below to upload a project.
Download and install Git
git config --global user.name "Your Name"
git config --global user.email email@example.com
Add your public key
git add README
git commit -m 'first commit'
git remote add origin firstname.lastname@example.org:tirenga/tirenga.git
git push origin master
Permission denied (publickey). fatal:
The remote end hung up unexpectedly
For me the problem was the execution of clone via sudo.
If you clone to a directory where you have user permission ( /home/user/git) it will work fine.
(Explanation: Running a command a superuser will not work with the same public key as running a command as user. Therefore github refused the connection.)
This solutionr requires a SSH key already to be set up: https://help.github.com/articles/generating-ssh-keys