我得到使用sudo git pull origin master
一个问题,我产生了SSH密钥和我说他们Gitlab,但我的命令不起作用......问题使用Git拉
命令:
****:/var/www/****$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQ****4rZZwQjt0VmJdb8zGQwcNMsYAZTCssjNw1UQZqTSUZRy8uK76W9h9kXsVgggAf1EgUKaxaKFFMF50TtugkdsSIGq4/ze9vYDrEVy4rc4aOTPuBNI9X01JRbvUdRtOajmC8WEq5NdLUwXCtg/Cga2uZ ****
****:/var/www/****$ sudo git pull origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
****:/var/www/****$
可能root的ssh没有被配置为在'〜/ .ssh'中使用你的用户密钥。 –
好的,我该怎么办? – tonymx227