![](/img/trans.png)
[英]Bundler error: Retrying git cat-file … If this error persists you could try removing the cache directory
[英]Error "git cat-file: could not get object info" in docker container after Docker desktop update
在 win 10 上將 Docker 桌面更新到 2.2.0.4 后,我在容器中出現錯誤“git cat-file:無法獲取對象信息”。 更新前一切正常。
Docker-compose.yml:
version: '3'
services:
python:
build:
context: .
dockerfile: Dockerfile
container_name: python
ports:
- "5000:5000"
volumes:
- .:/usr/src/app
Dockerfile:
FROM python:3
WORKDIR /usr/src/app
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . .
CMD ["flask", "run"]
git日志:
root@97cb634b1d22:/usr/src/app# git ls-files --stage -- /usr/src/app/database/db.py
100644 e94b169ef5fc85022ac40b10a27646019230ae3f 0 database/db.py
root@97cb634b1d22:/usr/src/app# git cat-file -s e94b169ef5fc85022ac40b10a27646019230ae3f
fatal: git cat-file: could not get object info
當一個對象在 git 數據庫中不存在但曾經存在並且 git 仍然以某種方式知道它時,就會發生這種情況。 出於好奇,我確實進行了壁球合並推送了合並的分支,但沒有推送對壁球合並有貢獻的提交,然后制作了遠程的新克隆並嘗試將其中一個壓縮的提交歸檔。 得到“貓文件:無法獲取對象信息”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.