0

當我執行gcloud docker push時,出現以下錯誤。無法從Google計算引擎實例運行gcloud docker推送

denied: Unable to create the repository, please check that you have access to do so. 

gcloud info顯示了配置gcloud正確的項目名稱。

有人請指導我解決這個問題嗎?或者建議替代方案。

我已經試過直接登錄不gcloud,登錄成功,但未能推

$docker login -e [email protected] -u oauth2accesstoken -p "$(gcloud auth print-access-token)" https://gcr.io 
Flag --email has been deprecated, will be removed in 1.14. 
Login Succeeded 
$ docker push gcr.io/project/imagename 
... 
denied: Unable to create the repository, please check that you have access to do so. 

$ gcloud --version 谷歌雲SDK 147.0.0

$搬運工--version 泊塢版17.03的3.0 CE,建立3a232c8

回答

0

如果你

gcloud docker -- push gcr.io/X/Y

您需要獲得寫入名爲'X'的GCP的權限。通常,您需要將其作爲項目編輯者添加到該項目中。

在這種情況下,GCR不會抱怨'gcloud info'顯示的項目。

+0

它被添加到項目作爲'編輯'。仍然無法正常工作 – abb

+0

我在粘貼的命令行中看到您正在推送到存儲庫 'gcr.io/project/imagename'。這是對的還是你改變了,以避免顯示你的圖像名稱?如果名稱正確,則需要將其作爲'EDITOR'添加到名爲'project'的項目中。如果您想保留您的項目名稱,請直接發送電子郵件至'gcr-contact @ google.com',以便我們可以通過電子郵件進一步討論以協助您。謝謝! –

相關問題