Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply: Ignores GIT_AUTHOR_* env vars #812

Closed
craigds opened this issue Apr 4, 2023 · 0 comments
Closed

apply: Ignores GIT_AUTHOR_* env vars #812

craigds opened this issue Apr 4, 2023 · 0 comments
Assignees

Comments

@craigds
Copy link
Member

craigds commented Apr 4, 2023

kart apply requires that the user has a gitconfig with their user details in it, even if GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL are in the environment.

To Reproduce

# This patch should apply to the 'points.tgz' repo in the kart test data
$ echo '{"kart.diff/v1+hexwkb": {"nz_pa_points_topo_150k": {"feature": [{"+": {"fid": 1307, "geom": "01010000004B9F46B66CA76540F97C998771AD41C0", "t50_fid": 2427552, "name_ascii": "changed", "macronated": "N", "name": "changed"}}]}}, "kart.patch/v1": {"authorName": "Test Testersen", "authorEmail": "tester@example.com", "message": "Rename some stuff"}}' > patch.json

$ export GIT_AUTHOR_NAME=a GIT_AUTHOR_EMAIL=a@example.com GIT_COMMITTER_NAME=a GIT_COMMITTER_EMAIL=a@example.com

$ kart apply --ref=HEAD patch.json
Error: Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

(Kart uses the same credentials and configuration as git)

Version info

happens with kart v0.12.3.dev0+ci.4975.gitb869c8ed on Linux (ubuntu) with no ~/.gitconfig file present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants