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

Add possibility add identity as parameter #35

Open
abtris opened this issue May 23, 2021 · 3 comments
Open

Add possibility add identity as parameter #35

abtris opened this issue May 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@abtris
Copy link

abtris commented May 23, 2021

Hi,
I'm getting this error that is caused that I use useconfigonly = true settings in git. Can you create app without create repo or have option to pass user credentials as parameters?

$ encore app create my-app
? Select app template: Hello World

Downloaded template hello-world.
error: create initial commit repository: Author identity unknown

*** 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: no email was given and auto-detection is disabled
 (exit status 128)
@eandre
Copy link
Member

eandre commented May 23, 2021

Hey, thanks for reporting! We should definitely support this use case. To help you quickly work around it, could you see if it works by setting GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL and then running encore app create?

export GIT_AUTHOR_NAME="Your Name"
export GIT_AUTHOR_EMAIL="you@example.com"
encore app create

If that doesn't work there are a few other workarounds but this is probably the easiest.

@abtris
Copy link
Author

abtris commented May 24, 2021

I forgot on this and this will solve it:

GIT_AUTHOR_NAME="Your name" GIT_AUTHOR_EMAIL="you@example.com" GIT_COMMITTER_NAME="Your name" GIT_COMMITTER_EMAIL="you@example.com" encore app create my-app

@eandre eandre added the bug Something isn't working label Aug 21, 2021
@eandre
Copy link
Member

eandre commented Aug 21, 2021

Thanks @abtris. I think the best way to solve this is by checking git config --list and scanning for user.email and user.name before creating a commit.

The question is what to do if this hasn't been configured? We could either prompt the user to specify it before proceeding, or we could set some reasonable defaults (Encore Bot <git-bot@encore.dev> or something). What do you think?

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

No branches or pull requests

2 participants