0%

github之push报错

remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

一、timeline

  1. git push报错
1
2
3
remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
fatal: unable to access 'https://github.com/liusirdotme/liusirdotme.git/': The requested URL returned error: 403
  1. 点击报错信息提供的url,可看到大概意思是加强了安全验证之类的

  2. 根据指引,先去创建access_token,复制,等下要用

  3. 创建完后根据指引去设置本地仓库

    • 验证是否安装osxkeychain helpergit credential-osxkeychain,正常会输出usage: git credential-osxkeychain <get|store|erase>
    • 设置git config --global credential.helper osxkeychain
  4. 将本地的keychain删除

    • 打开Spotlight(command + space)
    • 输入keychain,实际打开的是keychain Access.app
    • 在列表中搜索github.com,移除
  5. 重新git pull,要求输入用户名和密码,密码即刚刚生成的access_token

二、参考

  1. macOS Keychain
  2. credentials