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

Plugin creation fails if git user.email is not configured #48

Open
wpyoga opened this issue Feb 3, 2022 · 0 comments · May be fixed by #49
Open

Plugin creation fails if git user.email is not configured #48

wpyoga opened this issue Feb 3, 2022 · 0 comments · May be fixed by #49
Labels
bug Something isn't working

Comments

@wpyoga
Copy link
Contributor

wpyoga commented Feb 3, 2022

Describe the bug

If git's user.email option is not set, plugin creation fails.

Steps to reproduce

  1. Clone a repo without the git's global user.name option configured (you can temporarily rename ~/.gitconfig to achieve this effect)
  2. Run bash setup.bash
  3. Observe the error messages at the end (just before the TODO issues are shown).

Expected behavior

If the user.email option is not set, the script should ask for one.

Screenshots

william@t450s: ~/asdf-mytool-plugin$ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@github.com:wpyoga/asdf-mytool-plugin.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
william@t450s: ~/asdf-mytool-plugin$ bash setup.bash 
Name for your plugin, starting with `asdf-`, eg. `asdf-foo`
> asdf-mytool-plugin

Shell command for testing correct tool installation. eg. `foo --version` or `foo --help`
[mytool-plugin --help] > 

Your GitHub username
> my-github-username

Your name
> My Real Name

The tool's GitHub homepage.
[https://github.com/my-github-username/mytool-plugin] > 

The tool's documentation homepage if necessary.
[https://github.com/my-github-username/mytool-plugin] > 

Please choose a LICENSE keyword.
See available license keywords at
https://help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository#searching-github-by-license-type
License keyword:
mit/[apache-2.0]/agpl-3.0/unlicense > 

Setting up plugin: asdf-mytool-plugin

author:        My Real Name
plugin repo:   https://github.com/my-github-username/asdf-mytool-plugin
license:       https://choosealicense.com/licenses/apache-2.0/


mytool-plugin github:   https://github.com/my-github-username/mytool-plugin
mytool-plugin docs:     https://github.com/my-github-username/mytool-plugin
mytool-plugin test:     `mytool-plugin --help`

After confirmation, the `main` will be replaced with the generated
template using the above information. Please ensure all seems correct.
Type `yes` if you want to continue.
> yes

Already on 'template'
Preparing worktree (detached HEAD e518561)
HEAD is now at e518561 Initial commit
Switched to a new branch 'out'
rm '.gitlab-ci.yml'
rm '.gitlab/issue_templates/Bug_Report.md'
rm '.gitlab/issue_templates/Feature_Request.md'
rm '.gitlab/merge_request_templates/Merge_Request.md'
rm 'README-gitlab.md'
rm 'contributing-gitlab.md'

*** 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.

fatal: unable to auto-detect email address (got 'william@t450s.(none)')
error: refname refs/heads/out not found
fatal: Branch rename failed
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
All done.
Your main branch has been reset to an initial commit.
Push to origin/main with `git push --force-with-lease`
Review these TODO items:

Additional context

@wpyoga wpyoga added the bug Something isn't working label Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant