git推送權限被拒絕

git推送權限被拒絕

我有一個Ubuntu 18.0.4虛擬機,我想將我的程式碼推送到我在 gitlab 中建立的 git。

我已經做了什麼

  1. 安裝git
  2. 建立了 ssh 金鑰
  3. 將我的 ssh 金鑰新增至 gitlab
  4. 在gitlab中建立儲存庫
  5. git初始化
  6. git 遠端新增來源 the_git_link
  7. 須藤 git add .
  8. sudo git commit -m “msg”

我黏的東西

  1. sudo git Push 起源大師

來自 Ubuntu 終端機的錯誤訊息

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

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

相關內容