如何更新 Git 的密码? [英] How do I update the password for Git?

查看:58
本文介绍了如何更新 Git 的密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 BitBucket 与 Xcode 和 Git 结合使用进行版本控制,最近我更改了所有密码(感谢 Adob​​e!).

I'm using BitBucket with Xcode and Git for version control, and recently I changed all of my passwords (thanks Adobe!).

不出所料,我无法再将我的本地提交推送到我在 BitBucket 上的存储库(https://______.git"的身份验证失败),但我忘记了如何更新 iMac 上的缓存密码.不知何故,我一直无法在 Google 或 StackOverflow 上找到它,尽管在我看来它应该相当简单......

Unsurprisingly, I'm no longer able to push my local commits to my repository on BitBucket (Authentication failed for 'https://______.git'), but I'm forgetting how to update the cached password on my iMac. Somehow I've been unable to find it on Google or Stack Overflow, though it seems to me it should be rather straightforward...

推荐答案

要在 macOS 上解决此问题,您可以使用

To fix this on macOS, you can use

git config --global credential.helper osxkeychain

用户名和密码提示将出现在您的下一个 Git 操作(拉取、克隆、推送等)中.

A username and password prompt will appear with your next Git action (pull, clone, push, etc.).

对于 Windows,这是具有不同参数的相同命令:

For Windows, it's the same command with a different argument:

git config --global credential.helper wincred

这篇关于如何更新 Git 的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆