From bf4c1065dd9efe32c81ae1b198aff70b22b4ad85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E6=B0=B8=E8=BE=BE?= Date: Wed, 15 Mar 2023 23:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_posts/Git.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/source/_posts/Git.md b/source/_posts/Git.md index bfa47cb..708d277 100644 --- a/source/_posts/Git.md +++ b/source/_posts/Git.md @@ -36,7 +36,38 @@ git config user.email git config --list ``` +## 解决Git提交失败,提示用户密码错误 +remote: [session-8b4b799a] wenyongda: Incorrect username or password (access token) +首先查看C盘下gitconfig配置文件配置 +```properties +[core] + autocrlf = true +[user] + name = 文永达 + email = bmdzh11713@163.com +[difftool "sourcetree"] + cmd = 'C:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe' \"$LOCAL\" \"$REMOTE\" +[mergetool "sourcetree"] + cmd = 'C:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe' -base:\"$BASE\" -mine:\"$LOCAL\" -theirs:\"$REMOTE\" -merged:\"$MERGED\" + trustExitCode = true +[credential "https://gitee.com"] + provider = generic +``` + + 查看user下的password正不正确,如果没有设置转到控制面板 + +Windows下 `Win + R`运行输入`control` + +用户账户 -> 凭据管理器 -> 管理 Windows 凭据 -> 普通凭据 + +编辑 git:https://gitee.com下的用户名和密码 + +如果没有手动添加,并在Git Bash中执行 + +```shell +git config --global credential.helper wincred +```