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

Fail to created app due to GPG sign #1700

Open
ngdangtu-vn opened this issue Jan 11, 2025 · 2 comments
Open

Fail to created app due to GPG sign #1700

ngdangtu-vn opened this issue Jan 11, 2025 · 2 comments

Comments

@ngdangtu-vn
Copy link

ngdangtu-vn commented Jan 11, 2025

This is an error when I created example app in an empty directory:

§ encore app create
Log in / Sign up for a free Encore Cloud account to enable automated cloud deployments? (Y/n): n
  ✔ Language: Go           
  ✔ Template: Hello World  
  ✔ App Name: d            
                           

Downloaded template hello-world.
error: create initial commit repository: error: gpg failed to sign the data
fatal: failed to write commit object
 (exit status 128)

And this is another error when I created example app in a predefined git repo (with proper GPG sign) directory:

§ encore app create
Log in / Sign up for a free Encore Cloud account to enable automated cloud deployments? (Y/n): n
  ✔ Language: Go            
  ✔ Template: Hello World   
  ✔ App Name: bla-chan  
                            

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

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  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 e-mail address (got 'dangtu@blabla.(none)')
 (exit status 128)

I think this error happens because I have GPG sign as global in Git but I don't set email for it. The reason I don't set a global email because I have lot projects use different GPG sign (due to client requests). And I don't want to set a global email account. Do we have secret flag that let me create example app without using git? I didn't find anything userful in encore app create -h


update

I tried to temporary set the global email and name but I still got this error:

error: create initial commit repository: error: gpg failed to sign the data
fatal: failed to write commit object
 (exit status 128)

Does anyone have the same problem in linux before?


temporary solution:

go to https://github.com/encoredev/examples and download the example you wish to use.

@fredr
Copy link
Member

fredr commented Jan 13, 2025

Maybe this could solve your first issue at least: #35

@helmturner
Copy link

If you're on macOS, try this:

  1. download and install GPGTools Beta MacOS Sonoma/Sequoia: https://gpgtools.org/sequoia
  2. open the GPG keychain app from the app menu
  3. right click the key you use to sign and select 'sign'
  4. make sure the correct key is shown in the dropdown box and click 'sign'
  5. restart the gpg-agent with gpgconf --kill gpg-agent

If that doesn't do the trick, you might ensure you have installed pinentry-mac and set pinentry-program $(which pinentry-mac) in gpg-agent.conf (you might also need credential.helper=osxkeychain in your git config)

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

3 participants