git push error unable to create temporary sha1 filename
来源:互联网 发布:海康威视4g网络摄像头 编辑:程序博客网 时间:2024/05/25 13:32
问题描述
今天push代码 发现git报错如下
unable to create temporary sha1 filename!
网上找了下 发现几乎没有这个问题 有几个相似的问题 有的说版本库xxx.git权限不对 登陆到服务器上
排查过程
[xxx@xxx xxx]# ll | grep xxx.gitdrwxr-xr-x 7 git git 4096 11月 1 19:00 xxx.git
发现权限没有问题 git用户 755权限 没有问题 然后我就觉得这不是一个简单的问题
请系好安全带 老司机要转弯了 非正常问题要用非正常思维来考虑 果然
[xxx@xxx xxx]# df -hFilesystem Size Used Avail Use% Mounted on/dev/xvda1 20G 19G 23M 100% /tmpfs 1.9G 0 1.9G 0% /dev/shm
磁盘满了 shit!
常见情况及解决办法
感谢mingdh258同学的提醒 断电造成的磁盘锁定也会造成这种问题
在这里总结一下 git类似unable to write/create的错误 基本上都是git服务器的写入问题 目前已知的情况如下
1.服务器磁盘写满 导致无法写入 解决办法 清理磁盘分区
2.系统没有正常关机导致虚拟磁盘出现文件系统错误 可能只是一个分区也节能整个文件系统被锁定 在server上 mkdir会提示 Read-only file system!等提示 解决办法
查看下磁盘状态
[xxx@xxx ~]# fdisk -l Disk /dev/vda: 42.9 GB, 42949672960 bytes255 heads, 63 sectors/track, 5221 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00078f9c Device Boot Start End Blocks Id System/dev/vda1 * 1 5222 41940992 83 LinuxDisk /dev/vdb: 107.4 GB, 107374182400 bytes255 heads, 56 sectors/track, 14685 cylindersUnits = cylinders of 14280 * 512 = 7311360 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xf0ba90c3 Device Boot Start End Blocks Id System/dev/vdb1 1 14685 104850872 83 Linux
查看文件系统类型
[xxx@xxx ~]# mount/dev/vda1 on / type ext4 (rw,barrier=0)proc on /proc type proc (rw)sysfs on /sys type sysfs (rw)devpts on /dev/pts type devpts (rw,gid=5,mode=620)tmpfs on /dev/shm type tmpfs (rw)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
修复
重启系统后使用root进入单用户模式,运行
fsck.ext3 -y /dev/vda3
注意 ext3的文件系统使用fsck.ext3修复 ext4文件系统使用fsck.etx4修复 修复过程有时候会比较长
3.最常见的情况的 也就是版本库没有写入权限 ll | grep xxx.git 检查下权限
[xxx@xxx xxx]# ll | grep xxx.gitdrwxr-xr-x 7 git git 4096 11月 1 19:00 xxx.git
首先 目录用户及用户组为git 其次 755权限 如与上述不一样请运行
chown -R git.git xxx.git/chmod -R 755 xxx.git/
如果帮到你 麻烦在下面留个言 如果我描写的情况跟你的有所不同 麻烦留言告知我一下 我会帮助你解决并完善本为以帮助更多人
1 0
- git push error unable to create temporary sha1 filename
- InnoDB: Error: unable to create temporary file
- 968 InnoDB: Error: unable to create temporary file; errno: 2
- File upload error - unable to create a temporary file
- InnoDB: Error: unable to create temporary file; errno: 13
- Mysql启动错误:“InnoDB: Error: unable to create temporary file”的解决方法
- PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
- Git push error: Unable to unlink old (Permission denied)
- xcodebuild error: unable to rename temporary
- cc: 1501-225 (S) unable to create temporary file
- 纠错: git push error “fatal: Unable to find remote helper for 'https'"
- ERROR Unable to create process 740
- git push 失败 error:failed to push some refs to ...
- git https方式pull、push时,提示:error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh
- git代码管理:使用SourceTree push时错误:error: unable to rewind rpc post data - try increasing http.postBuffer
- subline error:unable to find git.exe..
- git error: unable to write file "xxx"
- 未解决Unable to use slave's temporary directory /tmp - Can't create/write to file '/tmp/SQL_LOAD-' (Err
- 一行代码使Android状态栏变沉浸式透明化
- 线程笔记之示例
- 51nod 区间的价值 V2
- 基础练习 十进制转十六进制
- 关于引用&的主意
- git push error unable to create temporary sha1 filename
- Javascript Math ceil()、floor()、round()三个函数的区别
- leetCode练习(118)
- jvm基础知识
- Java Date总结
- latex添加中文包
- ggplot2杂记
- 二叉树系列---求二叉树的最大路径和
- HDU 1016 Prime Ring Problem (DFS)