1
我正在致力於IBM-jazz
上的私人回購。Git - 隱藏遠程URL的一部分
首先,我想克隆該回購協議,我必須鍵入以下命令:
git clone https://user_name:[email protected]/git/repo_owner/repo_name
在做:
git remote show origin
它顯示我的憑據...
無論如何要防止這種情況發生?
我正在致力於IBM-jazz
上的私人回購。Git - 隱藏遠程URL的一部分
首先,我想克隆該回購協議,我必須鍵入以下命令:
git clone https://user_name:[email protected]/git/repo_owner/repo_name
在做:
git remote show origin
它顯示我的憑據...
無論如何要防止這種情況發生?
您可以省略憑據並使用git credential cache將它們緩存在內存中並緩解輸入它們的痛苦。您甚至可以使用store the credentials on disk,但請記住,這將以純文本形式存儲密碼。
的可能配置(從here拍攝)來緩存5分鐘的憑據是:
git config credential.helper 'cache --timeout=300'
你可以離開了密碼了,但是你必須在它每次提取時間輸入,推或拉。最好的解決方案是根本不使用HTTPS,而是使用SSH來代替。 – Collin