万隆的笔记 万隆的笔记
博文索引
笔试面试
  • 在线学站

    • 菜鸟教程 (opens new window)
    • 入门教程 (opens new window)
    • Coursera (opens new window)
  • 在线文档

    • w3school (opens new window)
    • Bootstrap (opens new window)
    • Vue (opens new window)
    • 阿里开发者藏经阁 (opens new window)
  • 在线工具

    • tool 工具集 (opens new window)
    • bejson 工具集 (opens new window)
    • 文档转换 (opens new window)
  • 更多在线资源
  • Changlog
  • Aboutme
GitHub (opens new window)
博文索引
笔试面试
  • 在线学站

    • 菜鸟教程 (opens new window)
    • 入门教程 (opens new window)
    • Coursera (opens new window)
  • 在线文档

    • w3school (opens new window)
    • Bootstrap (opens new window)
    • Vue (opens new window)
    • 阿里开发者藏经阁 (opens new window)
  • 在线工具

    • tool 工具集 (opens new window)
    • bejson 工具集 (opens new window)
    • 文档转换 (opens new window)
  • 更多在线资源
  • Changlog
  • Aboutme
GitHub (opens new window)
  • Git

  • Issue

    • sourcetree - error:insufficient permission for adding an object to repository database .git/objects
    • fatal:could not read Username for 'https://git.dev.tencent.com' 解决方法
  • Git
  • Issue
2022-03-25

sourcetree - error:insufficient permission for adding an object to repository database .git/objects

# sourcetree - error: insufficient permission for adding an object to repository database .git/objects

今天在使用Sourcetree工具的时候,突然拉取不了代码,出现了如题目的错误提示,具体如下:

git-issue-001

提示显示我们没有权限去操作当前这个仓库,我们只要定位到项目的.git目录,修改所属组为你当前用户所在组(通过 ls -al命令的大部分输出的权限确定名称和租名应该是什么),修改所有文件写权限即可:

1. cd /path/to/your/repo/.git/objects
2. ls -al 查看git库的所有者(git用户 git组)
3. chown -R yourname:yourgrounp * 或者sudo chmod 777 -R .git/objects 提交
sudo chgrp -R groupname .
sudo chmod -R g+rwX . 

参考:

  • Git Push Error: insufficient permission for adding an object to repository database (opens new window)
  • git--sourcetree使用踩坑之insufficient permission for adding an object to repository database和迁移仓库及其他事项 (opens new window)
上次更新: 5/30/2023, 10:03:37 PM
fatal:could not read Username for 'https://git.dev.tencent.com' 解决方法

fatal:could not read Username for 'https://git.dev.tencent.com' 解决方法→

最近更新
01
2025
01-15
02
Elasticsearch面试题
07-17
03
Elasticsearch进阶
07-16
更多文章>
Theme by Vdoing
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式