git中ssh配置方法

前提:必须先安装好Git for windows(即msysGit)和TortoiseGit

一,检查本地是否已存在ssh

$ cd ~/.ssh

$ ls

如果存在id_rsa.pub或者id_dsa.pub则表示你之前已经创建了,如果没有,则继续下一步。

二,生成 ssh

  1. 打开git bash
  2. cd ~
  3. ssh-keygen -t rsa -C "你的电子邮件地址"(注意:有大小写区分)
  4. 一路回车直到下一个$出现。
  5. clip <~/.ssh/id_rsa.pub (拷贝公钥到剪贴板)
  6. 把公钥粘贴到gitlab中(http://172.18.21.106/profile/keys名称应该随意)

三,配置TortoiseGit

    1,配置Git.exe路径,如下图。

    2,配置ssh.exe路径,如下图。

时间: 2024-08-11 09:56:33

git中ssh配置方法的相关文章

BlockCanary在Android原生开发中的配置方法

BlockCanary对主线程操作进行了完全透明的监控,并能输出有效的信息,帮助开发分析.定位到问题所在,迅速优化应用. 下面介绍配置方法. 1. 找到配置BlockCanary的jar包和arr包 blockcanary-android-1.5.0.aar blockcanary-analyzer-1.5.0-sources.jar 2. mk文件中引入jar包和arr包 引入jar包方法: LOCAL_STATIC_JAVA_LIBRARIES := dialerblockcanary-an

FCKEditor在jsp页面中的配置方法

大家在使用博客园或者是在网站上面发表一些东西的时候,往往会发现,输入文字的不是一个简单的文本框,而是一个类似于word的在线编辑环境.这个插件叫FCKEditor,使用这个插件要进行一定程度的配置,下面我把配置方法给大家分享一下. 总共要下载两个文件,第一个文件的下载地址是 https://sourceforge.net/projects/fckeditor/files/FCKeditor/2.6.8/打开这个页面后大家会看到 这时页面中有两个可下载项,大家点击第二个可下载项FCKeditor_

如何用命令将本地项目上传到git和ssh配置

嘛,就是将服务器上的网站和本地同步.首先是上传服务器上的网站到github仓库git initgit add .git commit -m ''关联远程仓库,先去github上新建一个,new repositorygit remote add origin 你的远程库地址同步 合并git pull --rebase origin master推送git push -u origin master克隆git clone [email protected]:jaxma/pig.git pig ssh

git生成ssh公钥方法--远程连接github仓库

先配置全局的用户名和邮箱 $ git config --global user.name "runoob" $ git config --global user.email [email protected] 生成公钥命令 #1.cd到当前用户加目录下 cd ~ #2.生成公钥文件 ssh-keygen -t rsa -C 'youremal' #3.查看你的公钥 cat .ssh/id_rsa.pub 将公钥添加到git设置中 1. 2. 3. 原文地址:https://www.cn

Spring之AOP在XML中的配置方法

AOP 即 Aspect Oriental Program 面向切面编程 先来一个栗子: <aop:config> <aop:pointcut id="loggerCutpoint" expression= "execution(* com.how2java.service.ProductService.*(..)) "/> <aop:aspect id="logAspect" ref="loggerAsp

git生成ssh配置

1. 配置git用户名和邮箱 git config user.name "用户名" git config user.email "邮箱" 2. 生成ssh key ssh-keygen -t rsa -C "邮箱" 3. 上传key到github clip < ~/.ssh/id_rsa.pub 复制key到剪贴板 登录github 点击右上方的Accounting settings图标 选择 SSH key 点击 Add SSH key

Git 中 SSH key 生成步骤

由于本地Git仓库和GitHub仓库之间的传输是通过SSH加密的,所以必须要让github仓库认证你SSH key,在此之前,必须要生成SSH key. 第1步:创建SSH Key.在windows下查看[c盘->用户->自己的用户名->.ssh]下是否有id_rsa.id_rsa.pub文件,如果没有需要手动生成.打开git bash,在控制台中输入以下命令. $ ssh-keygen -t rsa -C "[email protected]" 密钥类型可以用 -t

vue-cli中安装配置方法

vue-cli脚手架模板是基于node下的npm来完成安装的所以首先需要安装node 1.安装node,vue运行需要基于npm一定的版本,所以首先升级npm到最新的版本,而在安装的过程中个人比较喜欢淘宝的镜像,所以先安装cnpm(因为速度和稳定性都比较好) 2.在目标文件夹下打开终端 3.执行cnpm install vue-cli -g 全局安装 运行vue查看安装是否成功 4.运行vue init webpack(注:模板名称) sell2(注:项目名称) 5.进入项目文件夹下执行 cnp

CentOS VMware 下SSH配置方法详解

1.安装SSH[[email protected] ~]# yum install ssh2.启动SSH[[email protected] ~]# service sshd start3.设置开机运行[[email protected] ~]# chkconfig sshd on4.首先修改SSH的配置文件.如下: [[email protected] ~]# vi /etc/ssh/sshd_config ← 用vi打开SSH的配置文件 #Protocol 2,1 ← 找到此行将行头“#”删