在下载源码的过程中,有些在gitlab上,有写在github上。
本地电脑也有点问题:
git clone git@gitlab.com:kinco/source_code.git ,就可以正常下载,而加上sudo,变成
sudo git clone git@gitlab.com:kinco/source_code.git ,后就会出现错误
Cloning into 'source_code'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
其实key已经加入进去了。
而使用git clone https://github.com/ros-planning/navigation.git,不加sudo,就会有以下错误
Failed to connect to localhost port 48239: Connection refused
加上sudo后,代码可以正常下载,但权限需要重新修改,都是root.root,改成用户权限