1
我有一個用bitbucket託管的git repo,我在我的主目錄上有一個克隆,我想克隆另一個/var/www
目錄。當我嘗試克隆另一個副本到我的www
文件夾中我得到這個錯誤在一個以上的位置克隆一個bitbucket git repo
Cloning into 'php'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
有什麼錯我的公鑰,因爲我可以把改變從克隆的回購我對主文件夾到位桶,我可以看到我對所做的最新提交bitbucket網站。
這種行爲是否存在已知的解釋?
你想克隆爲不同的用戶(www-data或root)嗎?這些用戶不使用您自己的用戶帳戶的私鑰。 – knittl
我在做sudo git clone https://[email protected]/myusername/php.git所以它的根。 – Gandalf
那麼這可能是問題。請注意,您不必重新克隆整個存儲庫,只需將其複製到新位置並設置,然後使用「chown」更改所有者。 – knittl