Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究托管在IBM-jazz.
IBM-jazz
首先,当我想克隆这个 repo 时,我必须输入以下命令:
git clone https://user_name:password@hub.jazz.net/git/repo_owner/repo_name
做的时候:
git remote show origin
它显示了我的凭据...
有没有办法防止这种情况发生?
您可以省略凭据并使用git 凭据缓存将它们缓存在内存中并减轻输入它们的痛苦。您甚至可以将凭据存储在磁盘上,但请记住,这将以纯文本形式存储密码。
将凭据缓存 5 分钟的可能配置(取自此处)是:
git config credential.helper 'cache --timeout=300'