One node installation
Open Https://nodejs.org/en/nodejs official website download installation files double-click the. pkg file to install it automatically
Two install Git
Open http://code.google.com/p/git-osx-installer/Download latest pgk file Double-click the. pkg file to install it automatically. (Note: You may experience a trust issue that can be downloaded from the following locations by using the system Preferences--security and privacy--Select Continue installation)
GitHub uses SSH links and needs to set up SSH
1. Check SSH key
CD ~/.ssh
2. Back up the existing key (if any)
mkdir Key_backup
MV id_rsa* Key_backup
3. Generate SSH Key
$ ssh-keygen-t rsa-c [email protected]
Generating public/private RSA key pair.
Enter file in which to save the key (/USERS/SUNJIANPING88/.SSH/ID_RSA):
Enter passphrase (empty for no passphrase)://### This place is to set the password to enter the password you want to set can also not enter
Enter same Passphrase again:
Your identification have been saved in Yes.
Your public key had been saved in Id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [email protected]
The key ' s Randomart image is:
+---[RSA 2048]----+
|.. + =. =b**+*o |
|o O. oo+=o.o |
| . ..... O *.. |
|. OE. o = + |
|oo ... o S |
|= . . . |
|oo |
|=o. |
| B + |
+----[SHA256]-----+
4. Add SSH key to GitHub
$ cat ~/.ssh/id_rsa.pub
Ssh-rsa aaaab3nzac1yc2exxxzzzzzzqabaaabaqdv7yb10i+bv5s5suegvp9nryycukpx+a/ ipzs0zwid469saiw9ajrgnfsliwxxxxxxxmhvcgi9ny4c3ud4m3djvo+efgdueya4uzs2gpnmz7osmv6tcdgftvuqlifk1/ rzt0ieyrim8bcieh+lxb3m/fu+6vuxteqeihauart2dxxxxxxxxxrzxxsnq8he8t+/ wskuscxxxcaonobxxxxuzhauol7ybqnanghw3otlnnd08rfmv16mtalkrx5gvy2jyxchjxxxel6tqvxxxxxeuyxalcvsmw+ jklauhjrg6ebt2rnnvtd35alx1obi/qtmxxxxxxxx0jmmhmevkxshbn [email protected]
Login to GitHub page, personal settings->ssh and GPG keys->new SSH key
Copy the contents of the generated key (Id_rsa.pub file, which is the above command, cat ~/.ssh/id_rsa.pub get file) to the input box and click Add SSH key.
5. Test Links
$ SSH [email protected]
The authenticity of host ' github.com (192.30.252.122) ' can ' t be established.
RSA key fingerprint is sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Is you sure want to continue connecting (yes/no)? Yes
warning:permanently added ' github.com,192.30.252.122 ' (RSA) to the list of known hosts.
Saving Password to keychain failed
Identity added:/users/sunjianping/.ssh/id_rsa ((null))
PTY allocation request failed on channel 0
Hi sunjp748! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
The above message indicates that the connection was successful (GitHub does not provide a shell login but is connected successfully)
6. Setting up personal information
$ git config--global user.name "your_name"
$ git config--global user.email [email protected]
Three Bower Installation
1. Enter the command
$ sudo npm install-g Bower
/usr/local/bin/bower-/usr/local/lib/node_modules/bower/bin/bower
[Email protected]/usr/local/lib/node_modules/bower
2. New. bowerrc File Settings Save directory for download files
(1) You can create a new TXT file under the project root and then MV X.txt. BOWERRC
(2) Modify the contents of the. bowerrc file as
{
"Directory": "Public/javascripts/lib"//the directory where you want to save the downloaded library file
}
3. Go to the project directory, enter the command as follows Bower Init and then follow the prompts to fill in the content can be encountered select y/n y can
4. Try downloading the file
$ Bower Install jquery--save
Bower not-cached https://github.com/jquery/jquery-dist.git#*
Bower Resolve https://github.com/jquery/jquery-dist.git#*
Bower Checkout jquery#2.2.4
Bower Progress jquery#* receiving objects:26% (35/133), 220.00 KiB | 105.00 kib/s
Bower resolved https://github.com/jquery/jquery-dist.git#2.2.4
Bower Install jquery#2.2.4
jquery#2.2.4 Public/javascripts/lib/jquery
The above shows that the deployment has been successful
(Gulp build tool not yet completed)
MAC node + git + Bower simple installation