Github Repo Corruption - Sha1 Collision

后端 未结 4 1718
闹比i
闹比i 2020-12-08 14:58

Yesterday one of my team\'s checkins corrupted our github repo. On github, they were showing this error:

$ git fsck
error: sha1 mismatch 87859f196ec9266bada         


        
4条回答
  •  清歌不尽
    2020-12-08 15:13

    Just a reminder. A small likelihood of something happening is not the same as it not being able to happen. You can get hash collisions with git's use of sha-1. Once you have two files that collide, the likelihood becomes 100%. At that point, there's slim consolation from the theoretical likelihood. Add a space to one and you'll be fine though.

提交回复
热议问题