Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.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
如何在git bash中更改我的凭据?_Git_Bash_Credentials - Fatal编程技术网

如何在git bash中更改我的凭据?

如何在git bash中更改我的凭据?,git,bash,credentials,Git,Bash,Credentials,我需要更改主机的用户名和密码。 当我使用$git config-global credential.helper default时,它应该在下次使用repo时询问新用户和密码,但它不起作用 是否要更改我的用户名和密码?请确保对repo使用ssh url而不是https,然后尝试运行: git config-global user.name myusername git config-global user.email myemail我在这里遇到了同样的问题,我在git文档中找到了解决方案。写下以

我需要更改主机的用户名和密码。 当我使用$git config-global credential.helper default时,它应该在下次使用repo时询问新用户和密码,但它不起作用


是否要更改我的用户名和密码?

请确保对repo使用ssh url而不是https,然后尝试运行:

git config-global user.name myusername
git config-global user.email myemail

我在这里遇到了同样的问题,我在git文档中找到了解决方案。写下以下几行,一切都会好起来,为你的下一个commhrigit做准备

$ git config credential.helper store
$ git push http://example.com/repo.git
  Username: <type your username>
  Password: <type your password>

这里是指向文档的链接:

请更清楚地定义它不起作用。