我在 Ubuntu 上搭建了 git 服务器, git clone 的时候一直说没有权限或者文件夹不存在, 后来我尝试用 root 登录, ls -a, 显示的文件夹都是对的. 然后我用 git 登录, ls -a, 没有找到我自己创建的文件夹, 导致 git clone 一直找不到目标文件夹. 我换成 root 用户去 git clone, 没问题. 现在我该怎么办?
1
noe132 Oct 8, 2017 via Android
chown git:git /path/to/repo
|
3
hawkflying Oct 8, 2017
|
4
PinkStarrySky OP @noe132 我查看了权限, 如下, 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/ |
5
PinkStarrySky OP @NetCobra 麻烦看下 4 楼. T - T
|