我是GCP的新手,並試圖將我的庫回推到運行Debian的GCP計算引擎。Git推谷歌雲計算引擎
我下載gcloud指令工具跑
gcloud compute config-ssh
這給了我作爲輸出中ssh golub-vm.us-west1-a.golub-182114
。 之後,我做了一個
gcloud compute ssh golub-vm
而在~/apps/golub/golub.git
創建遠程裸git倉庫所以我通過增加一條,作爲一個遙控器來我的本地庫:
git remote add gsrvr [email protected]:/apps/golub/golub.git
,並試圖一推,但我m如果您的
D:\golub>git push gsrvr master
bash: git-receive-pack: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
注:我確信/apps/golub/golub.git
歸golub:root
所有。我究竟做錯了什麼?
哦,我試圖用gcloud compute scp
將本地文件複製到服務器,它工作正常,所以它不應該與所有權的問題,對不對?
我正在運行Bitnami LAMP圖像。因此,完整的路徑將是/opt/bitnami/apps/golub/golub.git
有與SSH沒有問題,我可以連接就好了通過使用Git Bash的SSH(我在Windows上)像你所要求的。我試着改變它,所以我在URL中使用服務器和用戶名:'[email protected]:/apps/golub/golub.git(push)'但我得到了同樣的錯誤。 SSH密鑰正確,我在'/ .ssh/config'中啓用了日誌,並設置了'LogLevel DEBUG3'。我嘗試了不同的道路,使用相對和絕對的方法。就像使用'/ home/golub/apps/golub/golub.git'一樣,它們都不起作用。這可能是權限問題嗎?我很確定'golub'可以RW到文件夾 –
@EdisGolubich你有%USERPROFILE%\。ssh \ config'文件嗎?如果是的話,它的內容是什麼? – VonC