meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git:issues:safedirectory [2023/07/17 16:05] – niziak | git:issues:safedirectory [2025/07/04 13:51] (current) – niziak | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| ===== Source of problem ===== | ===== Source of problem ===== | ||
| - | GIT version changelog: | + | Current user is not owner of git repository directory ('' |
| - | < | + | |
| - | 2.31.0: | + | |
| - | Two new ways to feed configuration variable-value pairs via | + | |
| - | environment variables have been introduced, and the way | + | |
| - | GIT_CONFIG_PARAMETERS encodes variable/ | + | |
| - | to make it more robust. | + | |
| - | </ | + | |
| - | Related GIT commits: | + | * Version 2.30.5 Contains commit: [[https:// |
| - | < | + | |
| - | f9dbb64fadf599c588a39d2251bb3f9a2f7d572a | + | |
| - | </code> | + | |
| - | So old | + | ===== Workaround ===== |
| - | <file c environment.h> | + | Silence all warning (risky!): |
| - | #define CONFIG_DATA_ENVIRONMENT " | + | <code bash> |
| - | #define CONFIG_COUNT_ENVIRONMENT " | + | git config --global --replace-all safe.directory ' |
| + | </code> | ||
| + | |||
| + | NOTE: '' | ||
| + | |||
| + | <file config .gitconfig> | ||
| + | [safe] | ||
| + | directory=* | ||
| </ | </ | ||
| - | ===== Workaround ===== | ||
| - | Add directory | + | Silence warning for specified |
| + | <code bash>git config --global --add safe.directory / | ||
| + | NOTE1: Multiple config entries can be addedd to add more directories | ||
| + | |||
| + | NOTE2: '' | ||
| + | |||
| + | |||
| + | ==== Workaround using env ==== | ||
| Do not use envirnonment **GIT_CONFIG_PARAMETERS**. It is only for internal git use, and format is not published. | Do not use envirnonment **GIT_CONFIG_PARAMETERS**. It is only for internal git use, and format is not published. | ||
| - | Set following env variables | + | For modern git (v2.31.0) |
| < | < | ||
| GIT_CONFIG_COUNT=1 | GIT_CONFIG_COUNT=1 | ||
| Line 52: | Line 56: | ||
| GIT_CONFIG_VALUE_0=* | GIT_CONFIG_VALUE_0=* | ||
| </ | </ | ||
| + | See: [[https:// | ||
| + | |||
| + | GIT version changelog: | ||
| + | < | ||
| + | 2.31.0: | ||
| + | Two new ways to feed configuration variable-value pairs via | ||
| + | environment variables have been introduced, and the way | ||
| + | GIT_CONFIG_PARAMETERS encodes variable/ | ||
| + | to make it more robust. | ||
| + | </ | ||
| + | |||
| + | Related GIT commit: | ||
| + | < | ||
| + | f9dbb64fadf599c588a39d2251bb3f9a2f7d572a | ||
| + | </ | ||
| + | |||
| + | ==== Workaround for WSL ==== | ||
| + | <code shell> | ||
| ==== Workaround for Yocto ==== | ==== Workaround for Yocto ==== | ||