一覺醒來突然發現怎么沒法往github上push代碼了呢,這好恐怖~ 還好還好,不是github罷工,只是需要使用token而已,
Git password authentication is shutting down
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.
Please refer to this blog post for instructions on what you need to do to continue using git operations securely.
Removal
August 13, 2021, at 09:00 PST
來自github通知
創建 token
先登錄自己的github,找到setting




note 可以隨便寫

token的有效期可以設定,如果怕麻煩,可以設定為無期限,

可以為不同的用戶(組)生成不同的token,給予不同的token不同的權限,自己個人用的話,全選就可以了,


把生成的token復制下來,

使用token
原來輸入密碼的時候,輸入生成的token就可以了
$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token
詳細程序參考這里
現在再push一下,成功了!
$ git push --set-upstream origin master
Enumerating objects: 205, done.
Counting objects: 100% (205/205), done.
Delta compression using up to 8 threads
Compressing objects: 100% (203/203), done.
Writing objects: 100% (205/205), 618.80 KiB | 5.68 MiB/s, done.
Total 205 (delta 79), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (79/79), done.
To https://github.com/akstuki/CMQA.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/294585.html
標籤:其他
上一篇:計算機網路——應用層
