getsentry / craft

The universal Sentry release CLI 🚀
MIT License
133 stars 15 forks source link

ref: allow all mounted directories to be considered "safe" #455

Closed asottile-sentry closed 1 year ago

asottile-sentry commented 1 year ago

prevent these errors in github actions:

[info] Publishing version: "3.27.1"
[debug] Working directory: /github/workspace/__repo__
Error:  fatal: detected dubious ownership in repository at '/github/workspace/__repo__'
To add an exception for this directory, call:

    git config --global --add safe.directory /github/workspace/__repo__

  To add an exception for this directory, call:

  git config --global --add safe.directory /github/workspace/__repo__

this setting isn't great, as written -- but this restores the previous behaviour to unblock releases -- perhaps a better, more well scoped list can be determined instead in the future

BYK commented 1 year ago

It'd be better to revert this as it doesn't have any effect at run time and mounts are done at run-time.

You need a startup script that runs this or bake this into craft itself.

asottile-sentry commented 1 year ago

It'd be better to revert this as it doesn't have any effect at run time and mounts are done at run-time.

You need a startup script that runs this or bake this into craft itself.

it would work, if we didn't override HOME at runtime for no (?) reason

BYK commented 1 year ago

Oh, right since you do * but that config is not picked up because $HOME changes at runtime. I think the override comes from GitHub Actions due to how they run containers inside containers or whatever?

asottile-sentry commented 1 year ago

yeah I'm going to make it less special here: https://github.com/getsentry/publish/pull/1834/files