在将程序push到github的时候,失败了,开始的原因是因为AndroidStudio上登录的github账号过期了,需要重新登录,登录的时候要以token的方式,那么首先就要去github上面获取这个token,获取的流程如下:
1、在github右上角找到当前登录账号的头像,点击边上的倒三角展开,选择下面的Swttings选项

?2、进入页面后,左侧下方找到Developer settings选中

?3、左上方 选择Personal access tokens 个人访问的token,之后右上方选择Generate new token生成一个新的token

?4、Note自己随意设置一个名字,Expiration可以选择设置这个token的过期时间,Select scopes选择使用范围,一般全选就可以,也可根据实际需要 选择

?我使用的是全选,但是后面就又遇到了问题,在这里先防范一下,就是最后一项ssh_signing_key选中导致的,我这个是将ssh_signing_key这项取消选中就好了。

获取到token后登录成功,提交程序后报错提示OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10053,然后网上找了一些解决办法,好多解决方案都是通过下面的命令来处理
git config --global --unset http.proxy
git config --global --unset https.proxy
git config http.sslVerify "false"
git config --global http.sslVerify "false"
这些都是去解决代理? SSL等问题。
我尝试过这些方式之后还是失败的,然后又去测试一下与github上项目地址的连接是报错的
Failed to connect to github.com port 443
之后我找到了github上面获取token的时候的设置
?之前的全选中的,最下面一项是有关ssh的,
Full control of public user SSH signing keys
完全控制公共用户的SSH签名密钥
Write public user SSH signing keys
编写公共用户SSH签名密钥
Read public user SSH signing keys
读取公共用户SSH签名密钥
把这项取消,更新token

之后再pull或push项目程序便成功了

|