1
45825ae 112 min ago Mike     fix bug        master(Blue's conflicted copy 2012-11-30)   
1ba982c 2 hours ago Mike     update doc

3fbc637 4 hours ago Mike     fix ui bug     master  
193b99e 5 hours ago Mike     fix model bug

Above is a shortlog of my git repo. Running git status from my project shows:

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

If i run push, it will give me:

 http://localhost/myproject.git: push not permitted

Any ideas?

EDIT: When I try to clone my project again, it gives me:

fatal: Reference has invalid format: 'refs/heas/master(Blue's conflicted copy 2012-11:30)'
spinningarrow
  • 2,406
  • 22
  • 32
Mike
  • 3,515
  • 10
  • 44
  • 67
  • Perhaps this might help: http://stackoverflow.com/questions/2888029/how-to-push-a-local-git-repository-to-another-computer – spinningarrow Nov 30 '12 at 09:56
  • Thanks for the link, however i can't get the point how it related to my problem. – Mike Nov 30 '12 at 10:13
  • This may help as well https://social.msdn.microsoft.com/Forums/en-US/c8ab60b2-dfbb-42a3-8bd1-e9684721f8eb/resolved-tf402455-pushes-to-this-branch-are-not-permitted-however-user-should-be-exempt-from I'm having the same problem and haven't found a fix yet. – A. Wentzel Feb 21 '19 at 18:33

1 Answers1

0

Maybe you are using wrong URL to push? Usually you push to ssh URL and http is used only for pulling.

If you want to push to HTTP, you need to run git-http-backend, with either enabled http.receivepack or use authentication, otherwise the backend will reject push as you see it. See man page for more details.

Michal Čihař
  • 9,799
  • 6
  • 49
  • 87