git - 用户在 Gitolite 上的所有 repos 上的写入权限

标签 git ubuntu gitolite

我正在尝试添加从本地到 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 the remote 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/

相关文章:

git - 拒绝 git push

c - 如何仅使用 C 编程语言用 GCC 编译 Allegro 5 程序

git - 没有共同的引用,也没有指定;什么也不做

git - 使用 go 语言与 gitolite

Gitolite - 如何禁止快进 merge ?

git - git clone gitosis@host :gitosis-admin. git 的密码问题

git - 如何从另一个存储库创建新分支?

c - 64 位 Ubuntu 上的利用

opengl - 运行已编译的 C++ 文件时出错(使用 OpenGL)。错误 : “Inconsistency detected by ld.so: dl-version.c: 224”

gitolite - 如何在不使用 gitolite-admin 的情况下向 gitolite 服务器添加 ssh key ?