Gitea v1.21.1 中文文档
/home/git \ 19. --create-home \ 20. git 1. mkdir -p /var/lib/gitea/{custom,data,log} 2. chown -R git:git /var/lib/gitea/ 3. chmod -R 750 /var/lib/gitea/ 4. mkdir /etc/gitea 5. chown root:git /etc/gitea WorkingDirectory 参数来配置工作路 径。 否则,使用环境变量 GITEA_WORK_DIR 来明确指出程序工作和数据存放路径。 1. export GITEA_WORK_DIR=/var/lib/gitea/ 1. cp gitea /usr/local/bin/gitea 可以在 contrib/autocompletion/bash_autocomplete 找到启用 bash zshrc 中引用。 具体情况可能会有所不同,这些脚本可能需要进一步的改进。 完成以上步骤后,可以通过两种方式运行 Gitea: 学习创建 Linux 服务 1. GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini 您可以通过停止程序,替换 /usr/local/bin/gitea 并重0 码力 | 303 页 | 3.88 MB | 1 年前3git 操作手册
'h�ps://gitlab.cof-lee.com' #设置数据存放路径,默认 /var/opt/gitlab/git-data/repositories git_data_dirs({ "default" => { "path" => "/git-data" } }) #设置备份存放路径及备份默认保存时间,默认 /var/opt/gitlab/backups/ gitlab_rails['backup_path'] firewall-cmd --run�me-to-permanent ★查看h�p配置: gitlab-ce自带有nginx软件,查看默认生成的配置: # cat /var/opt/gitlab/nginx/conf/nginx.conf # cat /var/opt/gitlab/nginx/conf/gitlab-h�p.conf # gitlab-ctl restart nginx # gitlab-ctl tail #查看日志 # tail -f /var/log/gitlab/gitlab-rails/produc�on.log # tail -f /var/log/gitlab/gitlab-rails/produc�on_json.log ★web界面 ★管理员账号登录web界面及修改密码0 码力 | 35 页 | 1.69 MB | 1 年前3Pro Git 2nd Edition 2.1.413
your repository. To allow read access to your repository over HTTP, do something like this: $ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update something like: $ git clone https://example.com/gitproject.git In this particular case, we’re using the /var/www/htdocs path that is common for Apache setups, but you can use any static web server — just put `GIT-VERSION-FILE' is up to date. GEN gitweb.cgi GEN static/gitweb.js $ sudo cp -Rf gitweb /var/www/ Notice that you have to tell the command where to find your Git repositories with the GITWEB_PROJECTROOT0 码力 | 731 页 | 21.49 MB | 1 年前3Pro Git 2nd Edition 2.1.413
your repository. To allow read access to your repository over HTTP, do something like this: $ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update like: 107 $ git clone https://example.com/gitproject.git In this particular case, we’re using the /var/www/htdocs path that is common for Apache setups, but you can use any static web server — just put `GIT-VERSION-FILE' is up to date. GEN gitweb.cgi GEN static/gitweb.js $ sudo cp -Rf gitweb /var/www/ Notice that you have to tell the command where to find your Git repositories with the GITWEB_PROJECTROOT0 码力 | 501 页 | 17.96 MB | 1 年前3Pro Git 2nd Edition 2.1.413
your repository. To allow read access to your repository over HTTP, do something like this: $ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update something like: $ git clone https://example.com/gitproject.git In this particular case, we’re using the /var/www/htdocs path that is common for Apache setups, but you can use any static web server — just put `GIT-VERSION-FILE' is up to date. GEN gitweb.cgi GEN static/gitweb.js $ sudo cp -Rf gitweb /var/www/ Notice that you have to tell the command where to find your Git repositories with the GITWEB_PROJECTROOT0 码力 | 691 页 | 13.35 MB | 1 年前3Pro Git 中文版 第2版 2.1.66
根目录,设置一个叫做 post-update 的挂钩就可以了 (见 Git 钩子)。 此时,只要能访问 web 服务器上你的版本库,就可以克隆你的版本库。 下面是设置从 HTTP 访问版本 库的方法: $ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update 向版本库推送之后被执行;然后别人就 可以通过类似下面的命令来克隆: $ git clone https://example.com/gitproject.git 这里我们用了 Apache 里设置了常用的路径 /var/www/htdocs,不过你可以使用任何静态 Web 服务器 —— 只 需要把裸版本库放到正确的目录下就可以。 Git 的数据是以基本的静态文件形式提供的(详情见 Git 内部原 理)。 通常的,会在可以提供读/写的智能 -Rf gitweb /var/www/ 需要注意的是,你需要在命令中指定 GITWEB_PROJECTROOT 变量来让程序知道你的 Git 版本库的位置。 现 在,你需要在 Apache 中使用这个 CGI 脚本,你需要为此添加一个虚拟主机:ServerName gitserver DocumentRoot /var/www/gitweb 0 码力 | 501 页 | 19.30 MB | 1 年前3Pro Git 中文版 第2版 2.1.66
post-update 的 挂钩就可以了 (见 Git 钩子)。 此时,只要能访问 web 服务器上你的版本 库,就可以克隆你的版本库。 下面是设置从 HTTP 访问版本库的方法: $ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update 向版本库推送之后被执行;然后别人就可以通过类似 下面的命令来克隆: $ git clone https://example.com/gitproject.git 这里我们用了 Apache 里设置了常用的路径 /var/www/htdocs,不过你可以使 用任何静态 Web 服务器 —— 只需要把裸版本库放到正确的目录下就可以。 Git 的数据是以基本的静态文件形式提供的(详情见 Git 内部原理)。 通常的,会在可以提供读/写的智能 -Rf gitweb /var/www/ 需要注意的是,你需要在命令中指定 GITWEB_PROJECTROOT 变量来让程序知道 你的 Git 版本库的位置。 现在,你需要在 Apache 中使用这个 CGI 脚本,你 需要为此添加一个虚拟主机:ServerName gitserver DocumentRoot /var/www/gitweb 0 码力 | 670 页 | 13.59 MB | 1 年前3
共 7 条
- 1