最近在用 hexo 的时候,上传命令
hexo d出现了
remote: Support for password authentication was removed on August 13, 2021. 这里说一下解决方案。
这是因为 github 将密码和账号登录的方式废弃了。
也就是目前能提交到 github 远程仓库的方法,有
- 账号和密码- 已经废弃
 
- ssh token
- 邀请机制
- Personal access tokens
先说一下 hexo 之前的上传方式,在 _config.yml 配置文件中,这样写的
deploy:
- type: git
  repo: git@gitee.com:**/***.git
  branch: master
- type: git
  repo: https://github.com/***/***.git
  name: ***
  email: ***
  branch: master我们先在 github 上申请 Personal access tokens

申请一个会得到一个 token 「自己设置过期时间还有权限」,然后把 token 换上去就行,改成
- type: git
      repo: https://<TOKEN>@github.com/<USERNAME>/<REPO>.git
      branch: master这样就 OK 了。
 
        