Git denied error help

Discussion in 'Web Design and Development' started by Cabbit, Oct 14, 2010.

  1. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #1
    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
     
  2. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #2
    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?
     
  3. Cabbit thread starter macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #3
    I am using Github i managed to bypass the problem using a program called smartgit that has made working with git much easier.
     

Share This Page