git
› Pro Git
› Atlassian Git Tutorial
› Pro Git 简体中文翻译
› GitX
PinkStarrySky
V2EX  ›  git

在 Ubuntu 上搭建 git 服务器, git clone 有问题

  •  
  •   PinkStarrySky · Oct 9, 2017 · 3232 views
    This topic created in 3325 days ago, the information mentioned may be changed or developed.
    我在 Ubuntu 上搭建了 git 服务器, git clone 的时候一直说没有权限或者文件夹不存在, 后来我尝试用 root 登录, ls -a, 显示的文件夹都是对的. 然后我用 git 登录, ls -a, 没有找到我自己创建的文件夹, 导致 git clone 一直找不到目标文件夹. 我换成 root 用户去 git clone, 没问题. 现在我该怎么办?.
    12 replies  •  2017-10-10 10:44:23 +08:00
    we000
    we000
    Oct 9, 2017
    1
    需要学习 Linux.

    改文件权限, 让操作 git 的用户可以读(本地? ssh?)
    jinhan13789991
    jinhan13789991
    Oct 9, 2017
    2
    建议使用 docker 安装 gitlab。非常快速方便
    lhc70000
    lhc70000
    Oct 9, 2017
    3
    如果不需要提供公开下载的话可以试试 gitolite
    youyoumarco
    youyoumarco
    Oct 9, 2017
    4
    可以用 gitlab 代替
    Norie
    Norie
    Oct 9, 2017
    5
    chown -R git:git yourdir
    zyq2280539
    zyq2280539
    Oct 9, 2017
    6
    来来来使用 gogs,十分钟搞定 git 系统,全面兼容,要求配置非常低,比 gitlab 要求更低,树莓派都可以轻松跑起来
    relaxchen
    relaxchen
    Oct 9, 2017
    7
    既然有人推荐了 GOGS,那我就推荐 Gitea 吧,搞事情
    PinkStarrySky
    PinkStarrySky
    OP
    Oct 10, 2017
    8
    @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/
    PinkStarrySky
    PinkStarrySky
    OP
    Oct 10, 2017
    9
    @Norie 看 8 楼
    PinkStarrySky
    PinkStarrySky
    OP
    Oct 10, 2017
    10
    @jinhan13789991 内存只有 1g 自己搭个小服务器玩 没必要...
    shingle
    shingle
    Oct 10, 2017
    11
    @SimleCp 内存 1g 使用 docker 没什么不妥啊,我的 1g 服务器已经运行了 8 个容器了
    PinkStarrySky
    PinkStarrySky
    OP
    Oct 10, 2017
    12
    @shingle 同时我们强烈推荐承载 GitLab 运行的服务器 至少分配 4GB 的内存 给 GitLab.
    我也很心痛...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2963 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 546ms · UTC 05:19 · PVG 13:19 · LAX 21:19 · JFK 00:19
    ♥ Do have faith in what you're doing.