您的位置:首页 > 移动开发 > Objective-C

insufficient permission for adding an object to repository database

2017-09-21 20:44 1111 查看
push git库,报错。

今天有同事找我,问我怎么回事,去看的时间,发现确实是 权限问题,git库的 所有者 为 nobody,

remo@remo:/qualcomm/jenkins/r1528_ap/oe-core$ git push

Counting objects: 10, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (5/5), done.

Writing objects: 100% (8/8), 676 bytes, done.

Total 8 (delta 3), 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 ssh://repogitgerrit@192.168.0.198/home/repogitgerrit/repositories/9x25oecore.git

 ! [remote rej
4000
ected] master -> master (n/a (unpacker error))

error: failed to push some refs to 'ssh://repogitgerrit@192.168.0.198/home/repogitgerrit/repositories/9x25oecore.git'

remo@remo:/qualcomm/jenkins/r1528_ap/oe-core$ ls

原因:
git库权限的问题
$ ls -la,查看git库的所有者

解决:
在git库目录下:
$sudo chown -R git:git git库(9x25oecore.git') 

1.使用root进入.git所在的文件路径,将权限重新赋给git库拥有者

sudo chown -R dwain .git/*

chown
-R dwain .git/*

down
vote
1) Make sure you're inside the repository where you're getting the error.

2) Get your username by typing
`whoami`


3) Enter this command

sudo
chown -R dwain .git/*


9down
vote
1) Make sure you're inside the repository where you're getting the error.

2) Get your username by typing
`whoami`


3) Enter this command

sudo
chown -R dwain .git/*


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐