insufficient permission for adding an object to repository database

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 rejected] 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/*

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/*


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/*

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值