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

directory search
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
characters

名稱

git-credential  - 檢索并存儲(chǔ)用戶憑證

概要

git credential <fill|approve|reject>

描述

Git 有一個(gè)內(nèi)部接口,用于存儲(chǔ)和檢索系統(tǒng)特定助手的憑證,并提示用戶輸入用戶名和密碼。git-credential 命令將此接口公開給可能想要以與 Git 相同的方式檢索,存儲(chǔ)或提示憑據(jù)的腳本。這個(gè)腳本化接口的設(shè)計(jì)模擬了內(nèi)部 C API; 有關(guān)這些概念的更多背景信息,請(qǐng)參閱 Git 憑證 API。

git-credential(GIT-憑證)呈現(xiàn)命令行的“動(dòng)作”選項(xiàng)(fillapprovereject之一),并讀取在 stdin 憑證描述(參見 INPUT / OUTPUT FORMAT)。

如果動(dòng)作是fill,git-credential 將嘗試通過讀取配置文件,聯(lián)系任何已配置的憑證助手,或通過提示用戶來將“用戶名”和“密碼”屬性添加到描述中。然后將憑證說明的用戶名和密碼屬性與已提供的屬性一起打印到 stdout。

如果動(dòng)作是approve,則 git-credential 將把描述發(fā)送給任何配置的憑證助手,這些憑證助手可以存儲(chǔ)該憑證供以后使用。

如果操作是reject,git-credential 將把描述發(fā)送給任何配置的憑證助手,這可能會(huì)擦除與描述匹配的任何存儲(chǔ)的憑證。

如果動(dòng)作是approve或者reject,則不應(yīng)該發(fā)布輸出。

典型的使用git credential(git 憑證)

使用 git-credential 的應(yīng)用程序通常會(huì)使用git credential以下步驟:

1. 根據(jù)上下文生成憑證描述。例如,如果我們需要一個(gè)密碼https://example.com/foo.git,我們可能會(huì)生成以下憑證描述(不要忘記最后一行的空行;它會(huì)告訴git credential應(yīng)用程序完成了它提供的所有信息): protocol=https host=example.com path=foo.git

2. 請(qǐng)求 git-credential 為我們提供用于此說明的用戶名和密碼。這是通過運(yùn)行完成的git credential fill,將步驟(1)中的描述反饋到其標(biāo)準(zhǔn)輸入。標(biāo)準(zhǔn)輸出將生成完整的憑證說明(包括憑證本身,即登錄名和密碼),如下所示:

protocol=https host=example.com username=bob password=secr3t

在大多數(shù)情況下,這意味著輸入中給出的屬性將在輸出中重復(fù),但Git也可能會(huì)修改憑證描述,例如,path在協(xié)議為 HTTP(s) 且credential.useHttpPath為 false 時(shí)刪除該屬性。

如果git credential知道密碼,在返回password=secr3t之前,則此步驟可能沒有涉及用戶實(shí)際輸入此密碼(用戶可能已輸入密碼來解鎖鑰匙串,或者,如果鑰匙串已解鎖,則沒有用戶交互)。

1. 使用憑證(例如,使用步驟(2)中的用戶名和密碼訪問URL),并查看它是否被接受。

2. 報(bào)告密碼的成功或失敗。如果憑證允許操作成功完成,則可以使用“批準(zhǔn)”操作標(biāo)記該操作,以告知git credential在其下一次調(diào)用中重用該操作。如果憑證在操作過程中被拒絕,請(qǐng)使用“拒絕”操作,以便git credential在下次調(diào)用時(shí)要求輸入新密碼。在任何一種情況下,git credential都應(yīng)提供從步驟(2)獲得的證書說明(其中也包含步驟(1)中提供的證書)。

輸入/輸出格式

git credential在其標(biāo)準(zhǔn)輸入/輸出中讀取和/或?qū)懭耄ㄈQ于所使用的動(dòng)作)證書信息。該信息可以對(duì)應(yīng)于git credential將獲得登錄/密碼信息(例如主機(jī),協(xié)議,路徑)的密鑰或者要獲得的實(shí)際證書數(shù)據(jù)(登錄/密碼)。

憑證分為一組命名屬性,每行一個(gè)屬性。每個(gè)屬性由鍵值對(duì)指定,由=(等號(hào))分隔,后跟換行符。密鑰可能包含除=換行符或 NUL  以外的任何字節(jié)。該值可能包含除換行符或 NUL 以外的任何字節(jié)。在這兩種情況下,所有字節(jié)都按原樣處理(即,沒有引用,并且不能用新行或 NUL 傳送值)。屬性列表由空行或文件結(jié)束符終止。Git 了解以下屬性:

protocol

證書將被使用的協(xié)議(例如,https)。

host

網(wǎng)絡(luò)憑證的遠(yuǎn)程主機(jī)名。

path

將使用憑證的路徑。例如,對(duì)于訪問遠(yuǎn)程 https 存儲(chǔ)庫,這將成為服務(wù)器上存儲(chǔ)庫的路徑。

username

憑證的用戶名,如果我們已經(jīng)有一個(gè)(例如,來自用戶的 URL 或先前運(yùn)行的助手)。

password

證書的密碼,如果我們要求它被存儲(chǔ)。

url

當(dāng)讀取這個(gè)特殊的屬性時(shí)git credential,這個(gè)值被解析為一個(gè) URL 并且被看作是它的組成部分被讀取了(例如,它的url=https://example.com行為就像是protocol=httpshost=example.com被提供的一樣)。這可以幫助呼叫者避免自己解析URL。請(qǐng)注意,URL 中缺少的任何組件(例如,上述示例中沒有用戶名)將被設(shè)置為空; 如果要提供 URL 并覆蓋某些屬性,請(qǐng)首先提供 URL 屬性,然后再提供任何覆蓋。

Previous article: Next article: