question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npx @backstage/create-app causes error: "Could not execute command git config user.name"

See original GitHub issue

Expected Behavior

The ‘Getting Started’ guide works https://backstage.io/docs/getting-started/

Actual Behavior

The ‘Getting Started’ guide does not work https://backstage.io/docs/getting-started/

Steps to Reproduce

  1. I create a new directory

  2. I run npx @backstage/create-app

  3. I enter a name for the app

  4. I get an error Error: Failed to read git config, Error: Could not execute command git config user.name

    npx @backstage/create-app
    Need to install the following packages:
      @backstage/create-app@0.4.32
    Ok to proceed? (y) y
    ? Enter a name for the app [required] my-backstage
    
    Creating the app...
    
    Error: Failed to read git config, Error: Could not execute command git config user.name
    
    It seems that something went wrong when creating the app 🤔
    
    🔥  Failed to create app!
    

I then tried to initialise a git repo myself with git init, but this did not have any effect.

When I run git config --list, I can see user.name

Context

It looks like the same happens in the GitHub Action https://github.com/backstage/backstage/actions/runs/3273459460/jobs/5385687308#step:9:19

This might be related to #13585?

Your Environment

  • Browser Information: n/a

  • Output of yarn backstage-cli info:

    yarn run v1.22.19
    error Couldn't find a package.json file in ".../backstage"
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
Rugvipcommented, Oct 21, 2022

@awanlin yep gonna dig into this a bit.

On the personal data aspect I wanna clarify that we’re of course not doing anything with that information, it’s simply a check to see if we will be able to initialize a git repo, since those values need to be set in configuration for that to be possible. I’ll look at refactoring the code to make it a bit more clear that that is the case. Now that check has of course also failed in this case, because the entire point of that check was that it should not be required, which it now has ended up being.

1reaction
awanlincommented, Oct 26, 2022

@aSemy can you try the above as well, please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to create app! - Could not execute command git config ...
Errors out with npx @backstage/create-app with the below error. ~ % npx @backstage/create-app ? Enter a name for the app [required] test.
Read more >
Git configuration user.name doesn't work - Stack Overflow
The first thing you should do when you install Git is to set your user name and e-mail address. This is important because...
Read more >
git-pull Documentation - Git
Incorporates changes from a remote repository into the current branch. If the current branch is behind the remote, then by default it will...
Read more >
Create an App - Backstage Demo
It guides you through the initial setup of selecting the name of the app and a database for ... The easiest way to...
Read more >
How set git config username and email fields in global and ...
Global git config. Fortunately, this fatal git error can be avoiding simply by issuing the following commands in the terminal to globally set ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found