为什么我不能使用gitosis添加新的存储库? [英] Why I can't add new repositories using gitosis?
问题描述
我设置了gitosis,但即使我可以克隆,拉动并推送到gitosis-admin回购站,我也无法创建新回复站。
根据每个doc我阅读,创建一个新的回购之一:
- 授予用户对回购的写入权限(在组内put:writable = repo-name)
- 用户在本地创建一个仓库添加一个远程仓库,然后进行推送
- 仓库中创建仓库
但是我总是得到致命的错误:'repo-name.git'似乎不是git存储库 code>
但是,如果在服务器上登录(以用户git)并使用 mkdir repo-name.git手动创建回购&安培;&安培; cd repo-name.git&& git --bare init
,然后我可以从我的本地仓库推到远程仓库。
#转到您想要启动项目的目录in。
git init; git add。
git commit -m'initial commit'
git remote add origin gitosis @ [server]:gitosis-test.git
git push --all
因此,在我做gitosis @ [server] /gitosis-test.git之前回顾一下,那是失败的。我换了分号,它工作。
在loglevel = DEBUG
上的道具它帮助我们了解发生了什么。
I set up gitosis but even when i can clone, pull and push to the gitosis-admin repo, i can't create new ones.
According to every doc i read, to create a new repo one has to:
- Give user write access to the repo (inside a group put: writable = repo-name)
- The user create a repo locally add a remote then does a push
- The repo is created in the server
But i always get the error fatal: 'repo-name.git' does not appear to be a git repository
But if a login on the server (as user git) and create the repo manually using mkdir repo-name.git && cd repo-name.git && git --bare init
, then i can push from my local repo to the remote one.
I was having this problem and I found out if I change the way I access the repository, it worked. After you have created the group writeable.
# Go to the directory you want to start your project in.
git init; git add .
git commit -m 'initial commit'
git remote add origin gitosis@[server]:gitosis-test.git
git push --all
So to recap before I was doing gitosis@[server]/gitosis-test.git and that was failing. I swapped the semicolon and it worked.
Props on the loglevel = DEBUG It helped a lot to find out what was happening.
这篇关于为什么我不能使用gitosis添加新的存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!