skaterdav85 Posted December 12, 2011 Share Posted December 12, 2011 I have created a test project on git hub and added a github user as a collaborator to the project under the project admin settings. I had him clone the repo, make some changes, and try and push back to github, but it isn't working. Essentially he typed in these commands: $ git clone git://github.com/skaterdav85/TestProject.gitChanged the files and pushing to GitHub repo$ git push git@github.com/skaterdav85/TestProject.git master He gets this error though:Permission denied (publickey).fatal: The remote end hung up unexpectedly Any idea what this means or how to fix it? He has pushed to his own repo's before on github. Link to comment Share on other sites More sharing options...
boen_robot Posted December 12, 2011 Share Posted December 12, 2011 I think cloning is not supposed to write back to the original repository. It is instead a fully independent non synchonizable copy.Instead of cloning, the other user should use "git init", and then "fetch" and/or "remote update" (I'm not sure if the order matters, or if one of these is enough; I'm new to git myself). The pushes would then be done as if this is his own repository.The alternative is the "fork & pull" approach, but that's for contributors ("Hey, a small correction, and I'll be leaving"), not collaborators ("You do X, I do Y... let's go!").[edit]Actually, this page on Github suggests a different possibility... to set up a new remote, and push to that rather than "origin".[/edit] Link to comment Share on other sites More sharing options...
skaterdav85 Posted December 13, 2011 Author Share Posted December 13, 2011 Actually, my friend may have been doing something wrong, but I'm not sure what he was exactly doing wrong because I wasn't at his computer with him. However, he did create a repository on his account and added me as a collaborator and this was my workflow: git clone cd into the clone made some changes to the cloned copy git add . git commit -m 'new commits' git push origin master If step 6 failed because my local copy wasn't in sync with the remote copy, I had to first do: git pull origin master, and then do git push origin master The problem might have been because he didn't do an add and a commit to his local repository first before pushing to github, but I'm not sure. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now