添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

When running a build with attestations, the following command is being run:

git rev-parse --is-inside-work-tree

https://github.com/docker/buildx/blob/afcb609966dc748a91cb5889fa63a34034117495/util/gitutil/gitutil.go#L60C29-L60C63

It's difficult to know what's the actual issue without running the command above manually.

In my case, I got this error:

fatal: detected dubious ownership in repository at '***'
To add an exception for this directory, call:
	git config --global --add safe.directory ***

I suggest considering returning the error from IsInsideWorkTree and printing it for the user. I don't mind working on this.