用户对 Gitolite 上所有回购的写入权限

Write Access for user on all repos on Gitolite

我正在尝试添加从本地到 gitolite 服务器的读取、写入和创建新存储库的访问权限。我的 gitolite 服务器上有以下配置,但它不想让我推送到新的 repo:

repo    @all
    RW+     =   git

repo    gitolite-admin
    RW+     =   git

repo    testing
    RW+     =   @all
    R       =   gitweb

我在本地创建了回购协议,并且做了

remote add origin git@myserver:myreponame.git

我得到的错误是

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目前在服务器上不存在,但我希望能够通过使用远程添加源命令自动添加它。

这可能吗?如果可以,我该如何配置?

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.

这不是使用 gitolite 添加新仓库的方式。

您需要修改您的 gitolite-admin 仓库的 conf/gitolite.conf 文件,以便添加一个 repo myreponame 部分,并带有访问规则(即使它的访问被第一个 repo @all节)。
然后你添加、提交并推送 gitolite-admin, 这将触发 repo 的创建 myreponame.

参见 section 2.2.3 add, remove, and rename repos

git remote add origin 纯粹是您的回购本地的,不会对 gitolite 及其 Git 托管服务器产生任何影响。