我跟着this tutorial:在一個ec2
實例上設置一個git部署過程。設置一個git部署過程到ec2
我仔細地通過配置文件中的~/.ssh/
主機將ssh'ing的所有步驟放入ec2
機器中。創建裸git回購。添加post-receive
掛鉤腳本等。
本地,我做了一些更改,提交。
然後我添加ec2
回購git remote add deploy ec2:/home/ec2-user/ab-site
(ab站點是我剛剛初始化的裸Git回購 - 而ec2
是我在~/.ssh/config
文件本地設置的ssh別名)。
然而,當我去推與git push deploy +master:refs/heads/master
我收到了一堆錯誤。
warning: core.bare and core.worktree do not make sense remote:
warning: core.bare and core.worktree do not make sense remote: error:
insufficient permission for adding an object to repository database
./objects remote: fatal: failed to write object error: unpack failed:
unpack-objects abnormal exit
所以我很好奇我應該看看下一步解決這個問題。
「不足許可用於添加一個目的是儲存庫數據庫」 - 這部分的錯誤信息告訴。我將開始檢查以確保您的ec2用戶(在本例中可能是'ubuntu')有權寫入存儲庫。 –