下载代码失败

yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$ git pull gitlab firefly-px3se:firefly-px3se
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

添加远程仓库了吗:git remote add gitlab git@gitlab.com:TeeFirefly/px3se-buildroot.git

Livvol 发表于 2018-6-20 17:57
添加远程仓库了吗:git remote add gitlab :TeeFirefly/px3se-buildroot.git

添加了,sdk中默认这个远程仓库已经就在的,我再添加的时候提示已经存在
yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$ git remote add gitlab git@gitlab.com:TeeFirefly/px3se-buildroot.git
fatal: remote gitlab already exists.
yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$

添加了,sdk中默认这个远程仓库已经就在的,我再添加的时候提示已经存在
yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$ git remote add gitlab git@gitlab.com:TeeFirefly/px3se-buildroot.git
fatal: remote gitlab already exists.
yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$

一切皆有可能 发表于 2018-6-21 09:01
添加了,sdk中默认这个远程仓库已经就在的,我再添加的时候提示已经存在
yuanmm@ubuntu:~/PX3/Firefly-PX3 …

那这个就奇怪了,我是可以git pull的,是不是你的ssh配置有问题?

ssh我没有配置过啊,该如何正确配置?

也可以到 https://gitlab.com/TeeFirefly/px3se-buildroot 在线浏览源码

我连这个都访问不了

最终解决办法,亲测有效

1,注册一个gitlab账号,注意注册的时候要用翻墙网络,要不有个验证流程过不去;网上也有说用其他办法可以跳过去,不过我没试过,有翻墙网,就直接翻了。

2,为GitLab帐号添加SSH keys并连接GitLab,参考如下链接

3,放心大胆的下代码吧,我的执行log如下
yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$ git pull gitlab firefly-px3se:firefly-px3se
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 24 (delta 14), reused 0 (delta 0)
Unpacking objects: 100% (24/24), done.
From gitlab.com:TeeFirefly/px3se-buildroot
4208947..24a1085 firefly-px3se → firefly-px3se

  • [new branch] firefly-px3se → gitlab/firefly-px3se
    Warning: fetch updated the current branch head.
    Warning: fast-forwarding your working tree from
    Warning: commit 42089476f5e7c0349ffc0fe20be03721322a5a53.
    Already up-to-date.
    yuanmm@ubuntu:~/PX3/Firefly-PX3-SE_Buildroot_git_180421$

这是 GitLab 为了增加自己的用户数而设置的障碍吗?

更新remote地址即可解决:
git remote set-url gitlab https://gitlab.com/TeeFirefly/px3se-buildroot.git