ionic start 运行git出错

时间:2021-08-14 19:01:36

1.错误显示:


admin@bogon ~/IonicProjs 

$ ionic start myApp tabs

Creating directory ./myApp - done!

[INFO] Fetching app base

       (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)

Downloading - done!

[INFO] Fetching starter templatetabs

       (https://github.com/ionic-team/ionic2-starter-tabs/archive/master.tar.gz)

Downloading - done!

Updating package.json with app details - done!

Creating configuration fileionic.config.json - done!

[INFO] Installing dependencies may take several minutes!

> npm install

Running command - done!

> npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest

Running command - done!

> git init

Running command - done!

> git add -A

Running command - done!

> git commit -m "Initial commit" --no-gpg-sign

Running command - failed!

[ERROR] An error occurred while runninggit commit -m "Initial commit"

        --no-gpg-sign (exit code 128):

        

        

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

        'admin@bogon.(none)')


2.解决方法:

错误原因:安装好Git后没配置email,name. 配置: admin@bogon ~ $ git config --global user.email“123456789@163.com" admin@bogon ~ $ git config --globaluser.name “yourName”
查看:
admin@bogon ~ $ git config --list credential.helper=osxkeychain user.email=123456789@163.com user.name=yourName

OK!