如何使用命令提示符更改 git 密码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32990470/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change the git password using command prompt?
提问by M_T
Let's say my git username is 'gitme' and the password is 'gitpass'. how do I change the password to 'gitpass1'? Please let me know.
假设我的 git 用户名是“gitme”,密码是“gitpass”。如何将密码更改为“gitpass1”?请告诉我。
采纳答案by Abdul Manaf
you can put the password in .netrc file (_netrc on windows). From there it would be picked up automatically. It would go to your home folder with 600 permissions.
a new option is to use the credential helper. Note that credentials would be stored in clear text in your local config using standard credential helper. credential-helper with wincred can be also used on windows.
您可以将密码放在 .netrc 文件(Windows 上的 _netrc)中。从那里它会被自动拾取。它将以 600 权限进入您的主文件夹。
一个新选项是使用凭证助手。请注意,凭据将使用标准凭据帮助程序以明文形式存储在本地配置中。带有 wincred 的凭证助手也可以在 Windows 上使用。
Usage examples for credential helper
凭证助手的使用示例
git config credential.helper store - stores the credentials indefinitely.
git config credential.helper 'cache --timeout=3600'- stores for 60 minutes
回答by Anantha Raju C
To reset/change your password in GitHub visit this website.
要在 GitHub 中重置/更改密码,请访问此网站。
- Enter the email address associated with your personal GitHub account.
- GitHub will email you a link that will allow you to reset your password. You must click on this link within 24 hours of receiving the email. If you don't receive an email from GitHub, make sure to check your spam folder.
- After clicking on the link in your email, you'll be asked to enter a new password.
- 输入与您的个人 GitHub 帐户关联的电子邮件地址。
- GitHub 将通过电子邮件向您发送一个链接,该链接将允许您重置密码。您必须在收到电子邮件后 24 小时内单击此链接。如果您没有收到来自 GitHub 的电子邮件,请务必检查您的垃圾邮件文件夹。
- 单击电子邮件中的链接后,系统会要求您输入新密码。
回答by Abdul Manaf
to change password in Bitbucket
在 Bitbucket 中更改密码
- Login to Bitbucket using current username & password
- Goto Manage Account(top right corner)
- Click Change Password, then enter old password and new password
- 使用当前用户名和密码登录 Bitbucket
- 转到管理帐户(右上角)
- 单击更改密码,然后输入旧密码和新密码