解决git commit报错问题
参考: https://stackoverflow.com/questions/3239274/git-commit-fails-due-to-insufficient-permissions
问题
git add或者git commit之后报错:
error: insufficient permission for adding an object to repository database .git/objects
error: insufficient permission for adding an object to repository database .git/objects
error: Error building trees
解决
sudo chown -R cygr-0101-01-0133 *cd .gitsudo chown -R cygr-0101-01-0133 *
核心原因
https://stackoverflow.com/questions/28832815/git-commands-require-sudo-on-osx
其实就是我们的项目git clone的时候, 需要系统sudo权限, 和我们git安装与关系. 应该是ssh需要系统权限. 即使操作了, 以后git fetch 和 git push 也需要权限. 但最起码, 保存不恶心了...
解决办法
chown -R <user> myproject
解决git commit报错问题的更多相关文章
- git commit报错解决,绕过代码检查
上一个项目用的svn,新项目用了git,很开心,终于学习了git了,本以为把git都学会了,但是还是遇到了一个不在自己学习的知识点范围内的问题,最后是同事帮忙解决的. 问题:第一次代码commit的时 ...
- linux 下解决git clone报错
解决报错:error: The requested URL returned error: 401 Unauthorized while accessing 问题报错:error: The req ...
- git commit 报错 There was a problem with the editor 'vi'
今天提交代码git commit -a的时候出现了这个错误 上网查了一下,说是Vim的返回值出错了,出错的原因还在翻译英文, 先贴出解决方案吧 git config --global core.ed ...
- 解决Git操作报错
情况一: 当我拉取的代码是最新的时候,git pull是可以正常的拉取的,但是却不可以提交,报错如下图: 情况二: 如果我目前不是最新的版本,需要git pull,此时拉取就会失败,报错如下图: 出现 ...
- 解决git push报错error: failed to push some refs to 的问题
这个问题发生的背景一般是: 想把自己本地的某个项目关联到远程仓库并推送上去,接着他会做如下操作: 本地项目->远程创建仓库->本地关联远程->推送最新代码 最后一个步骤发生问题: 那 ...
- 解决 git pull 报错 fatal: refusing to merge unrelated histories
我在Github新建一个仓库,写了License,然后把本地一个写了很久仓库上传. 先pull,因为两个仓库不同,发现refusing to merge unrelated histories,无法p ...
- git push报错大文件,删除后重新commit依然报错
git push报错: github不能上传大文件,按道理删掉重新提交就行了 可是删掉后,git add -A,再git commit,再git push,依然报错 后来我想明白了 github上传时 ...
- centos git clone 报错 fatal: HTTP request failed 解决办法
git clone报错提示 git clone https://github.com/xxxx.git Initialized empty Git repository in /root/xxxx/. ...
- 使用git clone 报错curl56 errno 10054解决方法
使用git clone 报错curl56 errno 10054解决方法 ----------------版权声明:本文为CSDN博主「伽马射线爆」的原创文章,遵循CC 4.0 BY-SA版权协议,转 ...
随机推荐
- ubuntn下 apt的用法和yum的比较(转)
centos有yum安装软件,Ubuntu有apt工具. apt简单的来说,就是给Ubuntu安装软件的一种命令方式. 一.apt的相关文件 /etc/apt/sources.list 设置软件包的获 ...
- codeforces 660A A. Co-prime Array(水题)
题目链接: A. Co-prime Array time limit per test 1 second memory limit per test 256 megabytes input stand ...
- 如何通过giihub下载软件
因为不懂英文, 所以找到了网站也不知道要怎么下载? 需求: 假设要下载的的一个jar包, mybatis-generator 1. 利用搜索引擎 2. 点进去, 看到那个release (rel ...
- jupyter-notebook重设项目工作路径
一. . Anaconda Prompt 命令(方法没生效) 1 选择一个用于存放config文件的文件夹(先创建) 2 在cmd中进入该文件夹的路径 3在cmd中 输入命令 jupyter not ...
- SQL 排序规则 CodeProject
http://www.cnblogs.com/ifreesoft/p/4259626.html 开发ERP数据维护工具之一 修改SQL Server数据库排序规则 Change Collation ...
- 搭建Node+NPM+Grunt+Ruby开发环境
序 最近尝试了一下CoffeeScript,和Sass,不得不说这两个搭配起来的确是不错的选择,熟悉以后基本上开发就比较快速了. 当然要开发这个首先需要搭建环境,这里就需要有Node.NPM.Grun ...
- POJ-2718
Smallest Difference Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12158 Accepted: 3 ...
- sorted matrix - search & find-k-th
sorted matrix ( Young Matrix ) search for a given value in the matrix: 1) starting from upper-right ...
- URL shortening service
Use Cases 1, shortening : take a URL => return a much shorter URL 2, redirection : take a short U ...
- 关于Flask使用Celery的实践经验分享
最近大Boss反馈Celery经常出现问题,几经实践终于把问题解决了!于是乎有了这篇博客的诞生,算是一个实践经验的分享吧! 软件版本如下: Celery () Flask () RabbitMQ( ...