git clone不成功
最近在用git clone时遇到了很多问题
fatal: unable to access 'https://github.com/xxx': Failed to connect to github.com port 443: Operation timed out |
大概原因如下:没有挂代理,没有配置git,没有改用token
举个例子,在安装UnrealEngine_4.26时
git clone --depth 1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git ~/UnrealEngine_4.26 |
如果没挂梯子:
会加载很久然后出现
fatal: unable to access 'https://github.com/xxx': Failed to connect to github.com port 443: Operation timed out |
下一步可能会让你输入GitHub的username,
需要注意的是,虽然是username,但需要输入的是注册时的邮箱
输完username后,会让我们输入password,但是如果你输入的是password
会出现错误
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/zjxht62/learnJava.git/': The requested URL returned error: 403 |
原因是因为:从 2021 年 8 月 13 日开始,我们将在对 Git 操作进行身份验证时不再接受帐户密码,并将要求使用基于令牌(token)的身份验证。
需要用token进行认证,也就是说password那里应该填token。
如果没有配置git,没有添加ssh
会显示
fatal: remote error: Git repository not found |
有的项目还必须得连接,比如说Unreal Engine,clone之前需要保证你的 github 账户和 Unreal Engine 账户连接。
https://www.unrealengine.com/en-US/ue-on-github
还得follow一下epic game
![image-20230712125350973](http://hengg.oss-cn-beijing.aliyuncs.com/img/image-20230712125350973.png)
总结
需要挂代理
需要配置git
设置token,用token代替密码
文章作者: Henggg
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Henggg's Blog!
评论