git 报错 error: insufficient permission for adding an object to repository database ./objects

参照:
http://stackoverflow.com/questions/1918524/error-pushing-to-github-insufficient-permission-for-adding-an-object-to-reposi

原因:
用ssh 管理时,客户端机器对服务器git代码仓库的写权限出了问题。如参考文

//登录到git 服务器ssh [email protected]  //进入代码仓库cd repository.git //改变代码仓库下,所有文件的访问权限,同组可写sudo chmod -R g+ws * //改变代码仓库下,所有文件的访问属性 sudo chgrp -R mygroup * //更新配置git repo-config core.sharedRepository true

原文地址:https://www.cnblogs.com/zoulixiang/p/9542688.html

时间: 2024-07-30 14:27:32

git 报错 error: insufficient permission for adding an object to repository database ./objects的相关文章

Git报错:insufficient permission for adding an object to repository database .git/objects

在本地搭建Git服务器后,在开发机上push新代码,发现Git提示: insufficient permission for adding an object to repository database .git/objects 出现的原因是:没有版本库所在目录的写权限,导致新的文件无法上传. 所以注意,在使用 sudo git init --bare xx.git 创建一个版本库之后,需要把权限调整一下,不然使用sudo创建后,是需要root权限的. 更改xx.git版本库的权限命令: su

ubuntu 下git commit error insufficient permission for adding an object to repository database .git/objects错误 解决方法

根据提示便知是权限问题, 用下面的命令查询objects下有root权限的文件ll .git/objects/ | grep root drwxr-xr-x 2 root   root   4096 3月   1 21:40 3d drwxr-xr-x 2 root   root   4096 3月   1 21:40 5c 有些文件确实存在root权限 切换到root用户,将对应的几个目录改回对应的所有者和用户组即可: 切换到root权限, su 第一次可能会提示验证失败 此时可以添加密码 s

git push error:error: insufficient permission for adding an object to repository database ./obje

http://stackoverflow.com/questions/1918524/error-pushing-to-github-insufficient-permission-for-adding-an-object-to-reposi 原因: 用ssh 管理时,客户端机器对服务器git代码仓库的写权限出了问题.如参考文 //登录到git 服务器 ssh [email protected]   //进入代码仓库 cd repository.git  //改变代码仓库下,所有文件的访问权限,

git推送报错: No path specified. See 'man git-pull' for valid url syntax或does not appear to be a git repository以及remote: error: insufficient permission for adding an object to repository databa

本地(windows)代码想推送到linux自己搭建的git服务端,第一步是建立本地与服务端的关联,第二步是本地推送到服务端. 第一步需要看你本地工程是否从git上clone来的,如果是clone来的那就不存在第一步了.但如果是本地已经有了工程之后才想同步到git上,需要先到linux的git上新增同名git仓库并初始化.这里以ms-util工程为例: cd git mkdir ms-util.git cd ms-util.git git --bare init 接着修改用户属主和用户组属主,并

insufficient permission for adding an object to repository database .git/objects

1.出错截图: 有时候使用软件项目管理系统github时候,会出现一些问题截图如下: 2.出错原因 从出错的地方就知道是因为权限不足导致,回想一下,在链接远程服务器时候,不小心切换为管理员权限进行了git pull更新的项目的代码. 如今切换为普通用户,应该是在git的某个目录下由于创建者是管理员,而当前用户权限比管理员小,故无法进行更新. 3.解决办法: 从项目根目录下找到.git 目录,该目录下有一个文件夹objects: 个人理解这些文件应该是记录了项目每次提交的信息,至于是怎么记录,差异

git在push的时候出现insufficient permission for adding an object错误

push git库,报错. 今天有同事找我,问我怎么回事,去看的时间,发现确实是 权限问题,git库的 所有者 为 nobody, [email protected]:/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 objec

git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保留本地的更改,中止合并->重新合并->重新拉取 $:git merge --abort $:git reset --merge $:git pull 解决办法二:舍弃本地代码,远端版本覆盖本地版本(慎重) $:git fetch --all $:git reset --hard origin/ma

解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02月22日 20:38:28 阅读数:19178 Git fetch和git pull的区别: 都可以从远程获取最新版本到本地 1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并) $:git fetch origin master //从远程的origin的master主分支

使用 Git 报错 error: src refspec master matches more than one.

今天在使用 Git push 代码时遇到一个报错: error: src refspec master matches more than one. error: failed to push some refs to '[email protected]:yn/enh.git' 出现这个错误是因为有一个与当前提交分支同名的标签 查看标签列表: git tag 删除这个标签: git tag -d <tag-name> 再次 push 就 ok 了