Write Access for user on all repos on Gitolite

178 views Asked by At

I'm trying to add access to read, write and create new repos from my local to a gitolite server. I have the following config on my gitolite server, but it doesn't want to let me push to a new repo:

repo    @all
    RW+     =   git

repo    gitolite-admin
    RW+     =   git

repo    testing
    RW+     =   @all
    R       =   gitweb

I created the repo on my local, and did

remote add origin git@myserver:myreponame.git

The error that I get is

W access for myreponame DENIED to git
(Or there may be no repository at the given path. Did you spell it correctly?)
fatal: Could not read from remote repository.

myreponame.git doesn't exist on the server currently, but I'd like to be able to add it automatically just by using the remote add origin command.

Is that possible, and if so, how do I configure that?

1

There are 1 answers

0
VonC On BEST ANSWER

myreponame.git doesn't exist on the server currently, but I'd like to be able to add it automatically just by using the remote add origin command.

That is not how you add a new repo with gitolite.

You need to modify your conf/gitolite.conf file of your gitolite-admin repo, in order to add a repo myreponame section, with an access rule (even though its access is covered by the first repo @all section).
Then you add, commit and push gitolite-admin, which will trigger the creation of the repo myreponame.

See section 2.2.3 add, remove, and rename repos

The git remote add origin is purely local to your repo and wouldn't have any effect to gitolite and its Git hosting server.