Android(安卓)Studio:Github Error:Could not read from remote repository【已解决】
16lz
2021-01-25
通过Android Studio clone Github 上项目时候,出现Could not read from remote repository错误
1. 网上方法:
打开AndroidStudio -setting-VersionControl-git-SSH-executable设置为 Native
但是并没有解决问题,依旧Could not read from remote repository
【解决方法】
git没有添加github上的私钥
【步骤】
1.打开git安装目录下的 git-bash
2. 输入: ssh-keygen -t rsa -C "xxx" [ps:xxx是你git的name,查看命令为:git config --list]
3.然后回车,三次回车出现以下即为成功
The key fingerprint is:SHA256:ybr8edDbPmEHGuocXnmjaPROq3Ra7jFPiAqpb0X0g44 xxxxThe key's randomart image is:+---[RSA 2048]----+| || . || . o || o.o.. . || + S+ + . || E.o.=.=.= . || o..=o*B*.+ || ..o +*B=*o || .o. +o===.o. |+----[SHA256]-----+
4.获取key;cat ~/.ssh/id_rsa.pub
5.打开github -所在项目下-Setting-Deploy keys,添加第四部获取的key即可
更多相关文章
- 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
- GitHub 标星 2.5K+!教你通过玩游戏的方式学习 VIM!
- 如何在后台运行Linux命令?
- No.11 使用firewall配置的防火墙策略的生效模式
- 不吹不黑!GitHub 上帮助人们学习编码的 12 个资源,错过血亏...
- android ADB (1) 键盘之adb keycode值
- 使用ant自动化构建android项目
- magicIndicator使用简记
- Fresco对Eclipse的支持以及使用教程