亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

?? ??? ??
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
??

命名

git-daemon  - 一個非常簡單的Git倉庫服務(wù)器

概要

git daemon [--verbose] [--syslog] [--export-all]             [--timeout=<n>] [--init-timeout=<n>] [--max-connections=<n>]             [--strict-paths] [--base-path=<path>] [--base-path-relaxed]             [--user-path | --user-path=<path>]             [--interpolated-path=<pathtemplate>]             [--reuseaddr] [--detach] [--pid-file=<file>]             [--enable=<service>] [--disable=<service>]             [--allow-override=<service>] [--forbid-override=<service>]             [--access-hook=<path>] [--[no-]informative-errors]             [--inetd |              [--listen=<host_or_ipaddr>] [--port=<n>]              [--user=<user> [--group=<group>]]]             [<directory>…]

描述

一個非常簡單的TCP Git守護(hù)進(jìn)程,通常在端口“DEFAULT_GIT_PORT”上監(jiān)聽9418.它等待連接請求服務(wù),并在服務(wù)啟用時提供服務(wù)。

它會驗(yàn)證該目錄是否具有魔術(shù)文件“git-daemon-export-ok”,并且它會拒絕導(dǎo)出任何未明確標(biāo)記為導(dǎo)出的Git目錄(除非--export-all指定了該參數(shù))。如果您將某些目錄路徑作為git daemon參數(shù)傳遞,則可以將報價進(jìn)一步限制為包含這些參數(shù)的白名單。

默認(rèn)情況下,只有upload-pack服務(wù)已啟用,供應(yīng)git fetch-packgit ls-remote客戶,這是從調(diào)用git fetchgit pullgit clone。

這非常適合只讀更新,即從Git存儲庫中提取。

一個upload-archive也存在服務(wù)git archive。

選項(xiàng)

--strict-paths

準(zhǔn)確地匹配路徑(即當(dāng)真實(shí)路徑為“/foo/repo.git”或“/foo/repo/.git”時不允許“/ foo / repo”)并且不執(zhí)行用戶相對路徑。git daemon將在此選項(xiàng)啟用且未指定白名單時拒絕啟動。

--base-path=<path>

將所有路徑請求重新映射為相對于給定路徑。這是一種“混帳根” -如果您運(yùn)行git daemon--base-path=/srv/git在example.com,那么如果您稍后嘗試?yán)?code>git://example.com/hello.git,git daemon將解釋路徑/srv/git/hello.git。

--base-path-relaxed

如果啟用了--base-path并且回購查找失敗,則使用此選項(xiàng)git daemon將嘗試查找而無需為基本路徑添加前綴。這對于切換到--base-path用法很有用,同時仍然允許舊的路徑。

--interpolated-path=<pathtemplate>

為了支持虛擬主機(jī),可以使用內(nèi)插路徑模板來動態(tài)構(gòu)建備用路徑。該模板支持由客戶端提供的目標(biāo)主機(jī)名的%H,但轉(zhuǎn)換為全部小寫,%CH表示規(guī)范主機(jī)名,%IP表示服務(wù)器IP地址,%P表示端口號,%D表示絕對路徑指定的存儲庫。插值后,路徑將根據(jù)目錄白名單進(jìn)行驗(yàn)證。

--export-all

允許從類似Git存儲庫(具有objectsrefs子目錄)的所有目錄中提取,即使它們沒有該git-daemon-export-ok文件。

--inetd

讓服務(wù)器作為inetd服務(wù)運(yùn)行。意味著--syslog。與--detach,--port,--listen,--user和--group選項(xiàng)不兼容。

--listen=<host_or_ipaddr>

監(jiān)聽特定的IP地址或主機(jī)名。如果支持,IP地址可以是IPv4地址或IPv6地址。如果不支持IPv6,則--listen = hostname也不受支持,并且 - 必須給予listen??梢越o予不止一次。與--inetd選項(xiàng)不兼容。

--port=<n>

聽取另一個端口。與--inetd選項(xiàng)不兼容。

--init-timeout=<n>

建立連接和接收到客戶端請求之間的時間(以秒為單位)(通常是一個相當(dāng)?shù)偷闹?,因?yàn)樗鼞?yīng)該基本上立即)。

--timeout=<n>

特定客戶端子請求超時(以秒為單位)。這包括服務(wù)器處理子請求所用的時間以及等待下一個客戶端請求所花費(fèi)的時間。

--max-connections=<n>

并發(fā)客戶端的最大數(shù)量,默認(rèn)為32.將其設(shè)置為零,無限制。

--syslog

記錄到syslog而不是stderr。請注意,這個選項(xiàng)并不意味著--verbose,因此默認(rèn)情況下只會記錄錯誤條件。

--user-path   --user-path=<path>

允許在請求中使用?用戶符號。當(dāng)指定不帶參數(shù)時,對git:// host /?alice / foo的請求將作為訪問foo用戶主目錄中存儲庫的請求alice。如果--user-path=path指定,則將同一請求作為訪問path/foo用戶主目錄中的存儲庫的請求alice。

--verbose

記錄有關(guān)傳入連接和請求文件的詳細(xì)信息。

--reuseaddr

綁定偵聽套接字時使用SO_REUSEADDR。這允許服務(wù)器在不等待舊連接超時的情況下重新啟動。

--detach

從外殼分離。意味著--syslog。

--pid-file=<file>

保存進(jìn)程ID file。守護(hù)進(jìn)程運(yùn)行時忽略--inetd

--user=<user>   --group=<group>

在進(jìn)入服務(wù)循環(huán)之前更改守護(hù)進(jìn)程的uid和gid。如果只--user給出沒有--group,則使用用戶的主要組ID。該選項(xiàng)的值給出,getpwnam(3)并且getgrnam(3)不支持?jǐn)?shù)字ID。

使用這些選項(xiàng)時出錯是錯誤的--inetd; git daemon如果需要,可以在產(chǎn)卵之前使用inet守護(hù)進(jìn)程的功能來實(shí)現(xiàn)。

像很多切換用戶ID的程序一樣,守護(hù)進(jìn)程不會重置環(huán)境變量,比如$HOME它運(yùn)行g(shù)it程序時,比如upload-packreceive-pack。使用此選項(xiàng)時,您可能還想在啟動守護(hù)程序之前將其設(shè)置并導(dǎo)出HOME到主目錄<user>,并確保該目錄中的任何Git配置文件都可讀<user>。

--enable=<service>   --disable=<service>

默認(rèn)情況下,啟用/禁用整個服務(wù)站點(diǎn)。請注意,如果服務(wù)器被標(biāo)記為可覆蓋,并且存儲庫通過配置項(xiàng)啟用該服務(wù),則每個存儲庫仍可以啟用服務(wù)禁用的整個網(wǎng)站。

--allow-override=<service>   --forbid-override=<service>

允許/禁止覆蓋每個存儲庫配置的站點(diǎn)范圍默認(rèn)值。默認(rèn)情況下,所有服務(wù)都可能被覆蓋。

--no-informative-errors

當(dāng)信息錯誤被打開時,git-daemon將向客戶端報告更多詳細(xì)錯誤,將“沒有這樣的存儲庫”與“未導(dǎo)出的存儲庫”等條件區(qū)分開來。這對客戶來說更方便,但可能會泄露有關(guān)未導(dǎo)出存儲庫存在的信息。如果未啟用信息性錯誤,則所有錯誤都會向客戶報告“拒絕訪問”。缺省值是--no-informative-errors。

--access-hook=<path>

每次客戶端連接時,首先運(yùn)行帶有服務(wù)名稱(例如“upload-pack”)的<path>指定的外部命令,存儲庫路徑,主機(jī)名(%H),規(guī)范主機(jī)名(%CH),IP地址%IP)和TCP端口(%P)作為其命令行參數(shù)。外部命令可以決定通過以非零狀態(tài)退出來退出服務(wù)(或通過以零狀態(tài)退出來允許它)。它還可以查看$ REMOTE_ADDR和$REMOTE_PORT環(huán)境變量,以便在做出此決定時了解請求者。

外部命令可以選擇將一行寫入其標(biāo)準(zhǔn)輸出,以便在拒絕服務(wù)時作為錯誤消息發(fā)送給請求方。

<directory>

要添加到允許目錄的白名單的目錄。除非指定了--strict-paths,否則它還將包含每個指定目錄的子目錄。

服務(wù)

這些服務(wù)可以使用此命令的命令行選項(xiàng)進(jìn)行全局啟用/禁用。如果需要更細(xì)粒度的控制(例如,允許git archive僅針對幾個選定的存儲庫運(yùn)行守護(hù)進(jìn)程),則可以使用每個存儲庫配置文件啟用或禁用它們。

upload-pack

這個服務(wù)git fetch-packgit ls-remote客戶。它是默認(rèn)啟用的,但是一個版本庫可以通過設(shè)置daemon.uploadpack配置項(xiàng)來禁用它false。

upload-archive

這個服務(wù)git archive --remote。它默認(rèn)是禁用的,但是一個存儲庫可以通過設(shè)置daemon.uploadarch配置項(xiàng)來啟用它true

receive-pack

這為git send-pack客戶提供服務(wù),允許匿名推送。它在默認(rèn)情況下是禁用的,因?yàn)?code>no在協(xié)議中有認(rèn)證(換句話說,任何人都可以將任何東西推入存儲庫,包括刪除參考)。這僅適用于每個人都很友善的封閉局域網(wǎng)環(huán)境。此服務(wù)可通過將daemon.receivepack配置項(xiàng)目設(shè)置為啟用true。

例子

我們在/ etc / services中假設(shè)如下

$ grep 9418 /etc/services
git                9418/tcp                # Git Version Control System

git守護(hù)進(jìn)程作為inetd服務(wù)器

要設(shè)置git daemon一個inetd服務(wù)來處理列入白名單的目錄集/ pub / foo和/ pub / bar下的任何存儲庫,請在/ etc / inetd中將以下條目全部放在一行中:

        git stream tcp nowait nobody  /usr/bin/git
                git daemon --inetd --verbose --export-all                /pub/foo /pub/bar

git守護(hù)程序作為虛擬主機(jī)的inetd服務(wù)器

要設(shè)置git daemon為處理不同虛擬主機(jī)的存儲庫的inetd服務(wù),www.example.com并在一行中www.example.org放入類似下面的條目/etc/inetd

        git stream tcp nowait nobody /usr/bin/git
                git daemon --inetd --verbose --export-all                --interpolated-path=/pub/%H%D                /pub/www.example.org/software                /pub/www.example.com/software                /software

在此示例中,根級目錄/pub將包含所支持的每個虛擬主機(jī)名的子目錄。此外,兩臺主機(jī)都簡單地將存儲庫發(fā)布為git://www.example.com/software/repo.git。對于1.4.0之前的客戶端,/software也可以創(chuàng)建符合鏈接到相應(yīng)的默認(rèn)存儲庫。

git守護(hù)程序作為虛擬主機(jī)的常規(guī)守護(hù)程序

要設(shè)置git daemon為基于其IP地址處理多個虛擬主機(jī)的存儲庫的常規(guī)非inetd服務(wù),請像下面這樣啟動守護(hù)進(jìn)程:

        git daemon --verbose --export-all                --interpolated-path=/pub/%IP/%D                /pub/192.168.1.200/software                /pub/10.10.220.23/software

在本例中,根級目錄/pub將包含每個支持的虛擬主機(jī)IP地址的子目錄。盡管存儲庫仍然可以通過主機(jī)名訪問,但前提是它們與這些IP地址相對應(yīng)。

選擇性啟用/禁用每個存儲庫的服務(wù)

要啟用git archive --remote和禁用git fetch存儲庫,請在存儲庫中的配置文件(即,和)config旁邊的文件中包含以下內(nèi)容。HEADrefsobjects

        [daemon]
                uploadpack = false
                uploadarch = true

環(huán)境

git daemon如果IP地址可用,會將REMOTE_ADDR設(shè)置為與其連接的客戶端的IP地址。REMOTE_ADDR將在服務(wù)執(zhí)行時調(diào)用的掛鉤環(huán)境中可用。

?? ??: ?? ??: