zoukankan      html  css  js  c++  java
  • mac安装 git npm Yeoman node.js等

    mac 

    打开“终端”

    1. 下载 git

    2.下载node.js

        自带npm但版本较低,升级版本:

        sudo npm install -g npm

    3.安装yeman

       sudo npm install --global yo

    sudo是linux系统管理指令,是允许系统管理员让普通用户执行一些或者全部的root命令的一个工具,如halt,reboot,su等等。

     1、升级npm:npm install -g npm
    2、安装yeoman:npm install -g yo
    3、安装生成器:
         生成器地址github地址:https://github.com/***/generator-***-springboot
         安装命令:npm install -g https://github.com/***/generator-***-springboot.git
    4、生成项目:yo或yo ***-springboot

    windows 10:

    问题 :

    C:WINDOWSsystem32>cd C:Program Files odejs

    C:Program Files odejs>npm install -g npm ▄ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░npm ERR! not a package C:Program Files odejs pm ▐ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░npm ERR! addLocal Could not install C:Program Files odejs pm ▄ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░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:UserspangqianAppDataLocalTemp pm-109656-43811c24unpack-3158d5bd09e31d56658b110fae7e44eapackage.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****AppDataLocalTemp pm-109656-43811c24unpack-3158d5bd09e31d56658b110fae7e44eapackage.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 odejs pm-debug.log

    C:Program Files odejs>

    解决:

    C:Program Files odejs>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) 问题:
    首先,清除所有的key-pair
    ssh-add -D
    rm -r ~/.ssh
    删除你在github中的public-key

    重新生成ssh密钥对
    ssh-keygen -t rsa -C "xxx@xxx.com"
    //以下两行是更改权限,我没有使用,直接用默认路径即可
    chmod 0700 ~/.ssh     
    chmod 0600 ~/.ssh/id_rsa*

    接下来正常操作
    在github上添加公钥public-key:
    1、首先在你的终端运行 xclip -sel c ~/.ssh/id_rsa.pub将公钥内容复制到剪切板[直接找到文件用记事打开也是可以的]
    2、在github上添加公钥时,直接复制即可
    3、保存

    测试:
    在终端 ssh -T git@github.com
    成功即可
     
  • 相关阅读:
    JavaScript原生对象属性和方法详解——Array对象[转]
    SVN的trunk branch tag (二)
    git入门使用摘录
    文字画工具推荐
    mysql 基础操作
    mobile 测试入门思维导图
    淘宝性能测试线下测试与线上跟踪体系
    github使用入门 之GIT GUI Windows版
    C++ 单向链表反转
    shell脚本实例一,移动文件夹中大于2000B的文件到另一个文件夹
  • 原文地址:https://www.cnblogs.com/pokay/p/5674290.html
Copyright © 2011-2022 走看看