Luke Puplett
Luke Puplett

Reputation: 45205

How do I configure a remote repository to accept locally-created branches?

This question:

How to push a locally-create branch

Received a +1 comment:

It looks like the remote repository has been configured not to allow you to push new branches.

Now, I created the remote repository using this ASP.NET project:

http://www.jeremyskinner.co.uk/2010/06/25/hosting-a-git-server-under-iis7-on-windows/

So, how do configure the remote repository to accept new branches? For the record, I can't imagine Jeremy's code does anything to disable pushing branches.

The remote repo has otherwise been working perfectly until I tried to push a branch created locally.

Update 1

Luke

Upvotes: 0

Views: 93

Answers (2)

Luke Puplett
Luke Puplett

Reputation: 45205

It seems the remote repo got corruptified. That's a word. On the server, in refs/heads/ was a folder for the branch, which made it appear that it had gotten so far to pushing and died.

So I renamed it and pushed again and it was fine.

Update

It actually seems that the problem recurs again. It's like I can only push a branch once.

Upvotes: 1

vonbrand
vonbrand

Reputation: 11831

Another reason for this (for reference, not an answer!) is that the remote repository is handled by e.g. gitolite, which does allow fine-grained control over what remote users are allowed to do. Plain git repositories can't be configured to disallow accesses AFAIK. Either you have full read/write access, or none. The only way to restrict writing is to use file/directory permissions.

Upvotes: 0

Related Questions