美文网首页
gitlab设置ssh免密登入 设置git环境变量 websto

gitlab设置ssh免密登入 设置git环境变量 websto

作者: 前端雨 | 来源:发表于2019-04-16 09:52 被阅读0次

    gitlab设置ssh免密登入

    1. 打开本地git bash, 使用如下命令生成ssh公钥和私钥对

      • ssh-keygen -t rsa -C 'xxx@xxx.com'然后一路回车(-C 参数是你的邮箱地址)
        生成ssh公钥和私钥对
    2. 然后打开~/.ssh/id_rsa.pub文件,复制其中的内容

      • ~表示用户目录,比如我的windows就是C:\Users\Administrator
    3. 打开gitlab, 找到Profile Settings-->SSH Keys--->Add SSH Key, 把复制内容copy到Key所对应的文本框,在Title对应的文本框中给这个sshkey设置一个名字,点击Add key按钮

    4. 配置git提交邮箱及姓名

      git config --global user.name "username"
      git config --global user.email "username@email.com"
    

    webstorm设置git环境变量

    1. 若未自定义安装, 则将路径改为安装路径即可 git-path
    2. 自定义安装git后, 路径改为C:\Program Files (x86)\Git\bin

    webstorm配置gitlab

    • file-settings中直接搜索github,然后输入自己github的账号密码 webstorm配置git

    webstorm激活软件

    1. 激活软件在弹出的框里面选择,code然后填这个激活码,先修改host文件后,再点击ok
    4RULSIH54N-eyJsaWNlbnNlSWQiOiI0UlVMU0lINTROIiwibGljZW5zZWVOYW1lIjoiMjA5OSAxODExIiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMTEtMjcifSx7ImNvZGUiOiJBQyIsInBhaWRVcFRvIjoiMjAxOS0xMS0yNyJ9LHsiY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAxOS0xMS0yNyJ9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDE5LTExLTI3In0seyJjb2RlIjoi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N8wcB2Kz+OIG0lih3yz5EqFhld03bGp222ZQCIghCTVL6QBNadGsiN/lWLl4JdR3lJkZzlpFdiHijoVRdWeSWqM4y0t23c92HXKrgppoSV18XMxrWVdoSM3nuMHwxGhFyde05OdDtLpCv+jlWf5REAHHA201pAU6bJSZINyHDUTB+Beo28rRXSwSh3OUIvYwKNVeoBY+KwOJ7WnuTCUq1meE6GkKc4D/cXmgpOyW/1SmBz3XjVIi/zprZ0zf3qH5mkphtg6ksjKgKjmx1cXfZAAX6wcDBNaCL+Ortep1Dh8xDUbqbBVNBL4jbiL3i3xsfNiyJgaZ5sX7i8tmStEpLbPwvHcByuf59qJhV/bZOl8KqJBETCDJcY6O2aqhTUy+9x93ThKs1GKrRPePrWPluud7ttlgtRveit/pcBrnQcXOl1rHq7ByB8CFAxNotRUYL9IF5n3wJOgkPojMy6jetQA5Ogc8Sm7RG6vg1yow==
    
    1. host 文件(C:\Windows\System32\drivers\etc)末尾粘贴这句
      • 0.0.0.0 account.jetbrains.com

    webstorm-----eslint的配置和使用

    1. 点击settings->pluings ->搜索eslint-> Install安装

      从setting进入 eslint下载安装
    2. 安装好之后,找到settings中ESLint,选中,就会进入配置页面,勾选Enable->第一项配置自己安装nodejs目录下node.exe,第二项配置当前项目中node_modules/.bin目录下的eslint.cmd,第三项改成.eslintrc.js

      点击Apply应用,点击ok就行了
    3. 使用可以在菜单栏下的code->ESlint Fix 修复,也可以设置快捷键,如下:
      点击keyMap->搜索eslint->选中code下面的eslint->右键Add Keyboard ShortCut 摁住自定义快捷键

      设置eslint代码规范校正快捷键

    相关文章

      网友评论

          本文标题:gitlab设置ssh免密登入 设置git环境变量 websto

          本文链接:https://www.haomeiwen.com/subject/chsvwqtx.html