Jump to content

Using Github As A Central Version Control System


skaterdav85

Recommended Posts

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

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

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:

  1. git clone
  2. cd into the clone
  3. made some changes to the cloned copy
  4. git add .
  5. git commit -m 'new commits'
  6. git push origin master
  7. 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...