Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在没有Windows凭据管理器的情况下,如何更改git帐户凭据_Git_Windows 10_Gitlab_Credentials_Git Push - Fatal编程技术网

在没有Windows凭据管理器的情况下,如何更改git帐户凭据

在没有Windows凭据管理器的情况下,如何更改git帐户凭据,git,windows-10,gitlab,credentials,git-push,Git,Windows 10,Gitlab,Credentials,Git Push,我的git客户端在Windows 10计算机上。我尝试过一次使用无效凭据推送我的代码。现在,每当我尝试推送提交时,它都会给我HTTP Basic: Access Denied fatal: Authentication failed exception. 我想这是因为我以前的凭据无效。我试图使用Windows凭据管理器更改保存的凭据,但由于安全策略,WCM在我的公司被阻止 您能否帮助我,如何在没有Windows凭据管理器的情况下更改已存储的凭据 $ git push origin master

我的git客户端在Windows 10计算机上。我尝试过一次使用无效凭据推送我的代码。现在,每当我尝试推送提交时,它都会给我HTTP Basic:

Access Denied fatal: Authentication failed exception.
我想这是因为我以前的凭据无效。我试图使用Windows凭据管理器更改保存的凭据,但由于安全策略,WCM在我的公司被阻止

您能否帮助我,如何在没有Windows凭据管理器的情况下更改已存储的凭据

$ git push origin master
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://my-host/gitlab/teamx/myapp.git/'

要保存凭据,您可以通过在命令行上设置用户名和密码来克隆存储库:

$ git clone https://<USERNAME>:<PASSWORD>@github.com/path/to/repo.git
要将用户名和密码保存到现有存储库,请运行以下命令以在Git存储库中启用凭据存储:

$ git config [--global] credential.helper store
--global
全局启用凭据)

启用凭据存储后,第一次从远程Git存储库中
拉入
推入
时,系统将要求您输入用户名和密码,然后将其保存在
~/.Git凭据中

在与远程Git存储库的下一次通信中,您不必提供用户名和密码

~/.git credentials
文件中的每个凭证都以URL的形式存储在自己的行中,如下所示:

https://<USERNAME>:<PASSWORD>@github.com
https://:@github.com

再看看这个。您也可以使用SSH身份验证(查看问题)。

使用SSH密钥是否可以接受?您将不再在WCM中进行中继。
https://<USERNAME>:<PASSWORD>@github.com