我在 Ubuntu 上搭建了 git 服务器, git clone 的时候一直说没有权限或者文件夹不存在, 后来我尝试用 root 登录, ls -a, 显示的文件夹都是对的. 然后我用 git 登录, ls -a, 没有找到我自己创建的文件夹, 导致 git clone 一直找不到目标文件夹. 我换成 root 用户去 git clone, 没问题. 现在我该怎么办?.
1
we000 Oct 9, 2017
需要学习 Linux.
改文件权限, 让操作 git 的用户可以读(本地? ssh?) |
2
jinhan13789991 Oct 9, 2017
建议使用 docker 安装 gitlab。非常快速方便
|
3
lhc70000 Oct 9, 2017
如果不需要提供公开下载的话可以试试 gitolite
|
4
youyoumarco Oct 9, 2017
可以用 gitlab 代替
|
5
Norie Oct 9, 2017
chown -R git:git yourdir
|
6
zyq2280539 Oct 9, 2017
来来来使用 gogs,十分钟搞定 git 系统,全面兼容,要求配置非常低,比 gitlab 要求更低,树莓派都可以轻松跑起来
|
7
relaxchen Oct 9, 2017
既然有人推荐了 GOGS,那我就推荐 Gitea 吧,搞事情
|
8
PinkStarrySky OP @we000 权限, 如下, srv 显示 git, 但是用 ssh 登录 git 账户, ls -a 里面还是没有 srv 这个文件夹.
total 68 drwx------ 8 root root 4096 Oct 8 08:57 ./ drwxr-xr-x 23 root root 4096 Jul 26 00:47 ../ -rw------- 1 root root 2441 Oct 9 01:15 .bash_history -rw-r--r-- 1 root root 3106 Oct 7 02:08 .bashrc drwx------ 2 root root 4096 Jul 26 00:49 .cache/ drwx------ 2 root root 4096 Oct 7 01:53 .gnupg/ -rw------- 1 root root 244 Oct 7 03:00 .mysql_history -rw-r--r-- 1 root root 221 Oct 7 02:10 .profile drwxr-xr-x 3 git git 4096 Oct 8 08:39 srv/ |
9
PinkStarrySky OP @Norie 看 8 楼
|
10
PinkStarrySky OP @jinhan13789991 内存只有 1g 自己搭个小服务器玩 没必要...
|
12
PinkStarrySky OP @shingle 同时我们强烈推荐承载 GitLab 运行的服务器 至少分配 4GB 的内存 给 GitLab.
我也很心痛... |