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) 問題: