存储在Github for Windows中的凭证可以与整个操作系统共享吗? [英] Can the credentials stored in Github for Windows be shared with the whole operating system?
问题描述
是否可以与整个操作系统共享GHfW的Git配置?理想情况下,我希望在系统PATH上拥有GHfW的git.exe,并且可以通过任何命令提示符存储通过GHfW存储的凭据?
Is it possible to share GHfW's Git configuration with the entire operating system? Ideally I'd like to have GHfW's git.exe on the system PATH and have the credentials stored through GHfW available from any command prompt?
推荐答案
默认情况下,GitHub For windows将使用%USERPROFILE%
作为它的%HOME%
来存储:
By default, GitHub For windows will use %USERPROFILE%
as its %HOME%
to store:
-
.gitconfig
(所有回购的全局配置)
.ssh / github_rsa
(由GitHub for Windows用于身份验证的私钥)*
。 ssh / github_rsa.pub
(GitHub for Windows用于身份验证的公钥)
.gitconfig
(global config for all repos).ssh/github_rsa
(private key used by GitHub for Windows for authentication)*.ssh/github_rsa.pub
(public key used by GitHub for Windows for authentication)
如果您正在工作如果将%HOME%
定义为相同的%USERPROFILE%,则GitHub for Windows的外部和git本地安装将受益于相同的设置。 code>环境变量路径。
If you are working outside of GitHub for Windows, and git local installation will benefit from the same settings provided the %HOME%
is defined to the same %USERPROFILE%
environment variable path.
但是,使用(实际查找)其包装的git版本并不容易:
GitHub对于Windows而言,只会公开包装的 ms ysgit
在%APPDATA%\GitHub\PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7\cmd\git.exe
,
with 8810fd5c2c79c73adcc73fd0825f3b32fdb816e7
是 的SHA1, github / msysgit
项目。
它在内部使用环境变量%git_install_root%
。
However, there is no easy way to use (actually find) its wrapped git version:
GitHub for Windows only exposes a wrapped msysgit
in %APPDATA%\GitHub\PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7\cmd\git.exe
,
with 8810fd5c2c79c73adcc73fd0825f3b32fdb816e7
being the SHA1 of a github/msysgit
project.
It uses internally the environment variable %git_install_root%
.
您可以在%USERPROFILE%\ Local Settings\Application Data\GitHub\shell.ps1
中查找其路径,尽管。
You can grep its path in %USERPROFILE%\Local Settings\Application Data\GitHub\shell.ps1
though.
这篇关于存储在Github for Windows中的凭证可以与整个操作系统共享吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!