github token验证

git push 出错:Support for password authentication was removed on August 13, 2021

创建token(Create Personal Access Token on GitHub):

From your GitHub account, go to Settings => Developer Settings => Personal Access Token => Generate New Token (Give your password) => Fillup the form => click Generate token => Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta

Now follow below method based on your machine:

For Windows OS 

Go to Credential Manager from Control Panel => Windows Credentials => find git:https://github.com => Edit => On Password replace with with your GitHub Personal Access Token => You are Done

If you don’t find git:https://github.com => Click on Add a generic credential => Internet address will be git:https://github.com and you need to type in your username and password will be your GitHub Personal Access Token => Click Ok and you are done

就是添加windows凭据

 

这步之后,依然不行,需要更改迁出方式,

Developer's hack (shortcode):

git remote set-url origin https://<githubtoken>@github.com/<username>/<repositoryname>.git

 参考:git - Support for password authentication was removed. Please use a personal access token instead - Stack Overflow

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
GitHub token是一种用于身份验证的令牌,用于替代传统的用户名和密码进行登录。生成自己的token可以通过以下步骤进行操作:首先登录到GitHub账号,然后在个人设置中找到"Developer settings",在左侧导航栏中选择"Personal access tokens",点击"Generate new token"按钮,然后根据需要选择相应的权限和范围,最后点击"Generate token"按钮生成token。生成的token可以用于各种GitHub操作,比如克隆仓库、推送代码等。在使用token进行克隆仓库时,可以使用以下命令:$ git clone https://github.com/username/repo.git Username: your_username Password: your_token \[2\]。另外,可以使用git remote命令来查看自己的url,使用git branch -v命令来查看自己的分支,使用git remote set-url <your_url> https://<your_token>@github.com/<username>/<repo>.git来更新自己的url \[3\]。通过使用token进行身份验证,可以提高账号的安全性,并且方便进行各种GitHub操作。 #### 引用[.reference_title] - *1* *3* [github不能使用账户密码登陆了? githubtoken使用(超详细)](https://blog.csdn.net/qq_42915526/article/details/122362565)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [githubtoken使用方法](https://blog.csdn.net/chengwenyang/article/details/120060010)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值