gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 18:47:07 25 4
gpt4 key购买 nike

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com