Gitlab权限被拒绝

时间:2020-09-11 12:04:47

标签: macos terminal upload gitlab

您好,我有一个gitlab服务器,Web界面的工作方式与ssh -T git@mijnstageportaal.nl相同, 但是当我尝试将文件夹上传到blaco项目时,它会说

git init
git remote add origin http://mijnstageportaal.nl/marijnboeve/sinterklaas-intocht
git add .
git commit -m "Initial commit"
git push -u origin master
Reinitialized existing Git repository in 
/Users/marijnboeve/websites/sinterklaasintocht/.git/
fatal: remote origin already exists.
HEAD detached from v8.0.1
nothing to commit, working tree clean
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

1 个答案:

答案 0 :(得分:0)

看看

Please make sure you have the correct access rights
and the repository exists.
  1. 很可能您在路径id_rsa上没有公共密钥/Users/YOUR_USER_NAME/.ssh。 您应该生成它,例如ssh-keygen -t rsa -b 2048 -C "email@example.com"(请参阅https://docs.gitlab.com/ee/ssh/)。

  2. 或者,http://mijnstageportaal.nl/marijnboeve/sinterklaas-intocht上的存储库确实不存在。您可以通过Web客户端进行检查,或者询问存储库所有者。