Git提交出错

问题描述

当执行 git push 推送本地代码至远程仓库时,提示输入账号密码,但按提示输入正确的账号密码后却报错。

背景/环境

  • Obsidian git自动提交

根本原因分析

GitHub 从2021年8月13日 09:00 PST 开始就不接受使用账户密码对 GitHub.com 进行 git 操作了。

As previously announced, starting on August 13, 2021, at 09:00 PST, we will no longer accept account passwords when authenticating Git operations on GitHub.com. Instead, token-based authentication (for example, personal access, OAuth, SSH Key, or GitHub App installation token) will be required for all authenticated Git operations.

链接在这里:Git password authentication is shutting down

解决方案

  1. 登陆github账号
  2. settings Devloper settings
  3. 增加key。

思考与关联

引用