mac node
打开“终端”linux
1. 下载 gitgit
2.下载node.jsgithub
自带npm但版本较低,升级版本:spring
sudo npm install -g npmsql
3.安装yemannpm
sudo npm install --global yojson
sudo是linux系统管理指令,是容许系统管理员让普通用户执行一些或者所有的root命令的一个工具,如halt,reboot,su等等。segmentfault
一、升级npm:npm install -g npm
二、安装yeoman:npm install -g yo
三、安装生成器:
生成器地址github地址:https://github.com/***/generator-***-springboot
安装命令:npm install -g https://github.com/***/generator-***-springboot.git
四、生成项目:yo或yo ***-springbootwindows
windows 10:
问题 :
C:\WINDOWS\system32>cd C:\Program Files\nodejs
C:\Program Files\nodejs>npm install -g npm ▄ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░npm ERR! not a package C:\Program Files\nodejs\npm ▐ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░npm ERR! addLocal Could not install C:\Program Files\nodejs\npm ▄ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░runTopLevelLifecycles ▀ ╢█████░░░░░░░░░░░░░░░░░░░npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "npm" npm ERR! node v5.4.0 npm ERR! npm v3.3.12 npm ERR! path C:\Users\pangqian\AppData\Local\Temp\npm-109656-43811c24\unpack-3158d5bd09e31d56658b110fae7e44ea\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\****\AppData\Local\Temp\npm-109656-43811c24\unpack-3158d5bd09e31d56658b110fae7e44ea\package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent
npm ERR! Please include the following file with any support request: npm ERR! C:\Program Files\nodejs\npm-debug.log
C:\Program Files\nodejs>
解决:
C:\Program Files\nodejs>npm install -g cnpm
OK
cnpm:国内镜像
2.
Windows 64位 npm 安装yeoman出错 求解,
node postinstall
node不是内部命令
解决方案:
npm install -g yo --ignore-scripts
问题:mac “您不能使用以点“.”开头的名称,由于这些名称已被系统预留。请选取其余名称。”
解决:
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
defaults write com.apple.finder AppleShowAllFiles FALSE ; killall Finder
mac -- git --github.com
3, 打开终端,使用git --version命令查看安装版本,有就是安装成功了
/*如下4.5命令若是已经使用Bitbucket建立过了,将会自动包含*/
4,建立一个全球用户名
git config --global user.name "FIRST_NAME LAST_NAME"
5,建立一个全球邮箱
git config --global user.email "MY_NAME@example.com"
6, 若是不想每次链接远程仓库都输入密码的话,输入以下命令
git credential-osxkeychain
------>等待
git config --global credential.helper osxkeychain
# Set git to use the osxkeychain credential helper
到此Git就安装完成了。
另:Permission denied (publickey) 问题: