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

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

  •  
  •   PinkStarrySky · Oct 9, 2017 · 3070 views
  •   You need to sign in to view this topic
    This topic created in 3230 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
        1
    we000  
       Oct 9, 2017
    需要学习 Linux.

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