Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Git サーバーのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Git サーバー
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:バージョン管理システム]] [[Category:サーバー]] [[en:Git server]] この記事では、[[Git]] サーバーをホストする方法について概要を説明します。より詳細な情報は、Pro Git book の [https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols Git on the Server chapter] の章を参照ください。 == プロトコル == 詳細な説明と長所・短所は、[https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols Git on the Server - The Protocols] を参照してください。 === 全般 === [https://miracoin.wordpress.com/2014/11/25/step-by-step-guide-on-setting-up-git-server-in-arch-linux-pushable/ Step by Step Guide on Setting Up git Server] では Arch での安全でないサーバーのセットアップを説明しています。 デフォルトでは、git ユーザは期限切れになっています("Your account has expired; please contact your system administrator")。有効期限切れの条件を解除するには、例えば、以下のように [[chage]] を使用します。 chage -E -1 git === SSH === [[OpenSSH|SSH サーバー]]を設置するだけです。 この SSH ユーザーアカウントでは、push と pull のコマンドのみを許可することで、より安全性を確保することができます。これは、デフォルトのログインシェルを git-shell に置き換えることで実現します。[https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server Setting Up the Server] で説明しています。 [[#全般]]の手順で作成した git サーバーをこの条項の手順 ([[#SSH]]) で保護する場合、Arch では以下の追加手順が必要です。 ;正しいホームディレクトリ: ssh が /srv/git/.ssh/authorized_keys を読めるようにするには、/etc/passwd の git 用ホームディレクトリを "/" から "/srv/git" に変更する必要があります。 ;ホームディレクトリが修正された場合のベースパスの修正: gitがリポジトリを提供するために、gitのホームディレクトリからリポジトリを提供する場合、"/usr/lib/systemd/system/git-daemon@.service" の --base-path を "/srv/git" へ変更する必要があります。 === Smart HTTP === {{Expansion|There are many [[web server]]s with CGI support.}} {{man|1|git-http-backend}} は CGI プログラムで、HTTP(S) で clone や pull, push を効率的に行うことができます。 ==== Apache ==== [[Apache HTTP Server]] をインストールし、{{ic|mod_cgi}}, {{ic|mod_alias}}, {{ic|mod_env}} を有効にして、そしてもちろん {{pkg|git}} があれば、この設定はかなり簡単です。 基本的なセットアップを実行したら、Apache の設定ファイルに以下を追加してください。 {{hc|/etc/httpd/conf/httpd.conf| <Directory "/usr/lib/git-core"> Require all granted </Directory> SetEnv GIT_PROJECT_ROOT /srv/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ }} This assumes your Git repositories are located at {{ic|/srv/git}} and that you want to access them via something like: {{ic|<nowiki>http(s)://your_address.tld/git/your_repo.git</nowiki>}}. {{Note|Make sure that Apache can read and write to your repositories.}} For more detailed documentation, visit the following links: * https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP * https://git-scm.com/docs/git-http-backend === Git === The Git protocol is not encrypted or authenticated, and only allows read access. The Git daemon ({{man|1|git-daemon}}) can be [[start]]ed with {{ic|git-daemon.socket}}. The service uses the {{ic|--export-all}} and {{ic|--base-path}} parameters to serve all repositories placed in {{ic|/srv/git/}}. == Access control == For fine-grained access control, the following solutions are available: * {{App|[[Gitolite]]|An access control layer on top of Git, written in Perl.|https://github.com/sitaramc/gitolite|{{Pkg|gitolite}}}} * {{App|[[Gitosis]]|Software for hosting Git repositories, written in Python.|https://github.com/tv42/gitosis|{{AUR|gitosis-git}}}} Note that if you are willing to create [[user account]]s for all of the people that should have access to the repositories and do not need access control at the level of git objects (like branches), you can also use standard [[file permissions]] for access control.[https://github.com/sitaramc/gitolite/blob/d74e58b5de8c78bddd29b009ba2d606f7fcb4f2d/doc/overkill.mkd] == Web interfaces == === Simple web applications === * [[Gitweb]] — the default web interface that comes with Git * {{App|[[cgit]]|A web interface for git written in plain C.|https://git.zx2c4.com/cgit/|{{Pkg|cgit}}}} === Advanced web applications === * {{App|[[Gitea]]|Painless self-hosted Git service. Community managed fork of Gogs.|https://gitea.io|{{Pkg|gitea}}}} * {{App|[[GitLab]]|Project management and code hosting application, written in Ruby.|https://gitlab.com/gitlab-org/gitlab-ce|{{Pkg|gitlab}}}} * {{App|[[Gogs]]|Self Hosted Git Service, written in Go.|https://gogs.io|{{AUR|gogs}}}}
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:App
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
Git サーバー
に戻る。
検索
検索
Git サーバーのソースを表示
話題を追加