github使用中遇到的问题

目录

push代码的时候报:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

向github push数据,出现错误Failed to connect to github.com port 443: Operation timed out


push代码的时候报:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

解决办法:使用personal access token进行验证

1. 获取personal access token

    在https://github.com登陆,然后点击头像->Settings->Developer setting->Personal access tokens->Generate new token->Generate token 生成token

2.为Android studio添加access token进行github认证

    Android Studio->Preferences->Version Contorl->github->+->Use Token 

3. Sourcetree使用personal access token 登录GitHub

    Sourcetree->选择一个项目进入->设置->远程仓库

    其中url/路径:https://<your_token>@github.com/<USERNAME>/<REPO>.git

  • <your_token>:换成你自己的token
  • <USERNAME>:你的github用户名
  • <REPO>:你的仓库名称

向github push数据,出现错误Failed to connect to github.com port 443: Operation timed out

有可能是没有在终端配置github的用户名和邮箱

$ git config --global user.name "username"
 
$ git config --global user.email "email"

参考以下资料:

github开发人员在七夕搞事情:remote: Support for password authentication was removed on August 13, 2021.

使用access token进行github认证

sourcetree使用personal access token 登录GitHub

向github push数据,出现错误Failed to connect to github.com port 443: Operation timed out

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值