Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
I keep getting this error when i try "git push origin master"
I set up my git for this project by following the example and i set up a new ssh key in my account.

ERROR: Permission to Cabbit/Cabbit-Framework denied to [othersecretprogect].
fatal: The remote end hung up unexpectedly
 
IIRC, Git is set, by default, to refuse any push requests on non-bare repositories. It has a rather nasty tendency to cause the working copy to become out of sync with HEAD and can cause data loss if you blow away refs that exist in the remote repo and not yours. You options are:
  • Convert the remote repo into a bare repo (if you aren't working on it directly)
  • If you are working from the remote, setup a bare repo elsewhere (which you push to) and setup a cron script to routinely pull from that repo
  • SSH in and do a pull from your current repo
  • Use the '--force' flag on push. Be careful though, this is like the '-rf' flags on rm and will not protect you from doing something stupid.

Any one else have other ideas?


Edit: Before doing any of the above, are you using a self-hosted git repo or a service like Gitorious and Github?
 
I am using Github i managed to bypass the problem using a program called smartgit that has made working with git much easier.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.