SDK下载常见问题及解决方案
问题1
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
解决办法:
请按照文档安装AW提供的repo程序 http://open.allwinnertech.com/guide/yht2/chan_pin_bao_xia_zai/zi_yuan_ku/23001_an_zhuang_repo_yin_dao_jiao_ben.html
问题2
Host key verification failed.
Fatal: could not read from remote repository.
Please make suer you have the corrent access rights
and the repository exists.
解决办法:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
ssh-agent bash
ssh-add ~/.ssh/id_rsa
问题3. 测试公钥是否添加成功。
执行ssh USERNAME@sdk.allwinnertech.com,如:ssh verify@sdk.allwinnertech.com,输出结果如下内容,则表示公钥已经添加成功。
fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
Connection to sdk.allwinnertech.com closed.
问题4. 如果公钥添加不成功,请按照以下步骤进行排查
(1)查看.ssh目录及其秘钥文件的权限是否设置正确。
cd ~/.ssh
ls -l
看到的权限设置应如下图所示:
否则,请执行以下命令,修改权限设置。
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
(2)确保通过一号通上传公钥的时候没有引入特殊字符,有些编辑器在打开id_rsa.pub的时候会自动引入换行符,建议通过cat命令将id_rsa.pub打印到屏幕后再邮件复制。
cat ~/.ssh/id_rsa.pub
(3)如果重新生成公钥或者~/.ssh目录下有多个可用公钥,请通过以下方式使公钥生效。
ssh-agent bash
ssh-add ~/.ssh/id_rsa
问题5. 下载repo 提示Connection timed out。
ssh: connect to host 61.143.53.198 port22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists .
fatal: cloning the git-repo repository failed,will remove'.repo/repo'
解决办法:
1. 执行which repo,找到repo的安装地址;
2. 将 repo 里面所有的 61.143.53.198 替换为 sdk.allwinnertech.com