因此,我是品牌屁股新Git和一般的發展。我是幾臺不同機器上的Linux和Mac用戶,並且有幾臺雲服務器和AWS,我在所有這些小型的python項目上工作。Git,有權限問題推送
我會嘗試首先解釋我想要的,希望我已經接近能夠爲我的用例工作的最佳解決方案。我希望能夠在我擁有的任何設備,家中的Ubuntu桌面,工作Macbook,雲服務器,工作中的Ubuntu桌面以及個人Macbook上編寫代碼。很明顯,我正在使用不同的主機名和用戶名,我是唯一一個在我的代碼上工作的人。
我經歷了git指南,它的工作,有點。我試圖在我的雲服務器上設置我的存儲庫,我也將更改代碼。我一直在嘗試從我的Macbook進行提交和推送,但一直在收到一系列權限錯誤,我不得不回到repo和chown -R作爲我的ssh wheel用戶,因爲每個對象都有作爲根被覆蓋。
這裏是試圖從我的MacBook推時,我看到了一些示例錯誤消息:
一個承諾:
macbook:dev macbookuser$ git commit
# On branch master
# Your branch is ahead of 'origin/master' by 6 commits.
#
nothing to commit, working directory clean
然後推:
macbook:dev macbookuser$ git push
[email protected]'s password:
Counting objects: 18, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (14/14), 1.62 KiB, done.
Total 14 (delta 7), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database ./objects
fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To [email protected]:/home/myserver-aka-repo/dev/.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to '[email protected]:/home/myserver-aka-repo/dev/.git'