我正在尝试添加从本地到 gitolite 服务器的读取、写入和创建新存储库的访问权限。我的 gitolite 服务器上有以下配置,但它不想让我推送到新的仓库:
repo @all
RW+ = git
repo gitolite-admin
RW+ = git
repo testing
RW+ = @all
R = gitweb
我在本地创建了 repo,并且做了
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 目前在服务器上不存在,但我希望能够通过使用 remote add origin 命令自动添加它。
这可能吗,如果可以,我该如何配置?
最佳答案
myreponame.git
doesn't exist on the server currently, but I'd like to be able to add it automatically just by using theremote add origin
command.
这不是您使用 gitolite 添加新存储库的方式。
您需要修改您的
conf/gitolite.conf
您的 gitolite-admin repo 文件,以便添加 repo myreponame
部分,带有访问规则(即使它的访问被第一个 repo @all
部分所涵盖)。然后添加、提交和推送 gitolite-admin,这将触发 repo
myreponame
的创建 .见 section 2.2.3 add, remove, and rename repos
git remote add origin
纯粹是您的 repo 本地的,对 gitolite 及其 Git 托管服务器没有任何影响。
关于git - 用户在 Gitolite 上的所有 repos 上的写入权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30835185/