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

Provide nice UX when a user needs to configure git user.name and user.email #25

Open
alexlatchford opened this issue Apr 22, 2021 · 0 comments

Comments

@alexlatchford
Copy link
Collaborator

vaishnavig@ZG02169 Code % battenberg -O new_dir install [email protected]:devex/archetypes/python-lib-archetype.git
Traceback (most recent call last):
  File “/usr/local/bin/battenberg”, line 8, in <module>
    sys.exit(main())
  File “/usr/local/lib/python3.9/site-packages/click/core.py”, line 829, in _call_
    return self.main(*args, **kwargs)
  File “/usr/local/lib/python3.9/site-packages/click/core.py”, line 782, in main
    rv = self.invoke(ctx)
  File “/usr/local/lib/python3.9/site-packages/click/core.py”, line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File “/usr/local/lib/python3.9/site-packages/click/core.py”, line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File “/usr/local/lib/python3.9/site-packages/click/core.py”, line 610, in invoke
    return callback(*args, **kwargs)
  File “/usr/local/lib/python3.9/site-packages/click/decorators.py”, line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File “/usr/local/lib/python3.9/site-packages/battenberg/cli.py”, line 80, in install
    battenberg = Battenberg(open_or_init_repository(ctx.obj[‘target’], template, initial_branch))
  File “/usr/local/lib/python3.9/site-packages/battenberg/utils.py”, line 44, in open_or_init_repository
    repo.default_signature,
KeyError: “config value ‘user.name’ was not found”

This massive stacktrace is a pretty terrible experience for an easy self-service fix for users, they just need to set git config user.name <my name> and git config user.email <my email> as pygit2 needs that to infer the default_signature.

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

1 participant