I enable certain users to create repositories by adding this to gitolite.conf file:
repo [a-zA-Z0-9].* C = @admin @staff RW+ = CREATOR RW = WRITERS @admin R = READERS @staff
To create a new repo I had to do this:
- checkout a empty repository with the new repo name as the project
git checkout gitolite@gitserver:newproject
- Copy over files
- Commit files git
commit -a -m "Initial Checkin"
- Push files to server
git add remote newproject gitolite@gitserver:newproject git push newproject master
Originally I was trying to do it:
mkdir newproject git init git add . git commit -a -m "Initial checkin" git push
But ran into this error:
fatal: No destination configured to push to.
Since I ran into this error, I found another way to do it.