Git第一次新建项目添加ssh key

Git第一次新建项目添加ssh key

Last login: Mon Sep  3 08:59:35 on console

localhost:~ dajiang$ cd ~/.ssh

-bash: cd: /Users/dajiang/.ssh: No such file or directory

localhost:~ dajiang$ sudo apt-get install git

Password:

sudo: apt-get: command not found

localhost:~ dajiang$ git config --global user.name "dajiang"

localhost:~ dajiang$ git config --global user.email "[email protected]"

localhost:~ dajiang$ git config user.name

dajiang

localhost:~ dajiang$ git config user.email

[email protected]

localhost:~ dajiang$ git config --list

credential.helper=osxkeychain

user.name=dajiang

[email protected]

localhost:~ dajiang$ ssh-keygen -t rsa -c "[email protected]"

Too many arguments.

usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa]

[-N new_passphrase] [-C comment] [-f output_keyfile]

ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]

ssh-keygen -i [-m key_format] [-f input_keyfile]

ssh-keygen -e [-m key_format] [-f input_keyfile]

ssh-keygen -y [-f input_keyfile]

ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]

ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]

ssh-keygen -B [-f input_keyfile]

ssh-keygen -D pkcs11

ssh-keygen -F hostname [-f known_hosts_file] [-l]

ssh-keygen -H [-f known_hosts_file]

ssh-keygen -R hostname [-f known_hosts_file]

ssh-keygen -r hostname [-f input_keyfile] [-g]

ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]

ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]

[-j start_line] [-K checkpt] [-W generator]

ssh-keygen -s ca_key -I certificate_identity [-h] [-U]

[-D pkcs11_provider] [-n principals] [-O option]

[-V validity_interval] [-z serial_number] file ...

ssh-keygen -L [-f input_keyfile]

ssh-keygen -A

ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]

file ...

ssh-keygen -Q -f krl_file file ...

localhost:~ dajiang$ ls

Desktop Downloads Movies Pictures

Documents Library Music Public

localhost:~ dajiang$ ssh-keygen -t rsa -C "[email protected]"

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/dajiang/.ssh/id_rsa):

Created directory ‘/Users/dajiang/.ssh‘.

Enter passphrase (empty for no passphrase): 不用输入密码,直接回车

Enter same passphrase again:

Passphrases do not match.  Try again.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Passphrases do not match.  Try again.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Passphrases do not match.  Try again.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Passphrases do not match.  Try again.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /Users/dajiang/.ssh/id_rsa.

Your public key has been saved in /Users/dajiang/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:RrygeBb/LIak8pmAjDAYALOn3uTjpqMgfctsqw62rWY [email protected]

The key‘s randomart image is:

+---[RSA 2048]----+

|=                |

|.o     .         |

|o . . . o        |

|.+ . + o .       |

|= ..= . S        |

|*o+= . +         |

|O+o+o o o        |

|+E+Boo .         |

|[email protected]==.           |

+----[SHA256]-----+

localhost:~ dajiang$

localhost:~ dajiang$ l

-bash: l: command not found

localhost:~ dajiang$ ls

Desktop Downloads Movies Pictures

Documents Library Music Public

localhost:~ dajiang$  长的、

-bash:  长的、: command not found

localhost:~ dajiang$ cd

localhost:~ dajiang$ ls

Desktop Downloads Movies Pictures

Documents Library Music Public

localhost:~ dajiang$ cd .ssh/

localhost:.ssh dajiang$ ls

id_rsa id_rsa.pub

localhost:.ssh dajiang$ cat id_rsa

-----BEGIN RSA PRIVATE KEY-----

MIIEpAIBAAKCAQEA7Pivtbvn9oX+8TszA8fCwL2jqPgm8cSI4z1l5Mlo770PXi/l

MMTpBA3EabgduoP5klDW0OTic4/qpqcEP0sHwKTHgk+QyH5aYYWnDXovXFNQKRtR

hxeEo3qXlcNN6ZGmBVZoiaiPe3e2uxNhJF2mHP/4LY1k4SxpLatfJj1xok89TRTV

daNRdaZcdpf26kdLJvJYF4NDW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vwe3ra6wEwbTQ3pHBVmtqcAbLR1hYaPwJXO+kn1TxBRlzLxN7xwjVac7uwAK

8ry9Wk/N9Qwopugtl9zxf8oX8nnq/SXxmmuNkx2hkOxJ3CJxkrHevomtKL+KUUOs

gtcXCcECgYBNdogoqAj/gCIxvmQnZSikR5bAQfsQEmUho43ETyXhSMy5iDi3GSEd

HhGYXl91peWE5Nq0t4OZA6j8+KcG/qhCC9G6BEPI5F01a9iCus2jaomK1/AJ2AKK

cDWU0WAwfyaRWSdGc0IZfwN7alAK/SO1h1PDWmYvV4DHQCP0f1Dasw==

-----END RSA PRIVATE KEY-----

localhost:.ssh dajiang$ cat id_rsa.pub 

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDs+K+1u+f2hf7xOzMDx8LAvaOo+CbxxIjjPWXkyWjvvQ9eL+UwxOkEDcRpuB26g/mSUNbQ5OJzj+qmpwQ/SwfApMeCT5DIflphhacNei9cU1ApG1GHF4SjepeVw03pkaYFVmiJqI97d7a7E2EkXaYc//gtjWThLGktq18mPXGiTz1NFNV1o1F1plx2l/bqR0sm8lgXg0Nau0RPrcztq3gwMpz546Pd7lkIzYZclgr14f8gVRbEwGBvJLWIjAu+9k5IiZsyHxeQ7ERW3DR5Jkjde7fklbkPjWQ0IPJQclQMhQUlUqsmc60+ANRuUSCL4EVza65xz7OUzkMoXhbFWis1 [email protected]

localhost:.ssh dajiang$

原文地址:https://www.cnblogs.com/-ios/p/9594035.html

时间: 2024-08-05 23:56:13

Git第一次新建项目添加ssh key的相关文章

sourceTree 添加 ssh key 方法

1.使用 git 客户的生成公私钥:id_rsa.id_rsa.pub 1.1设置Git的user name和email:$ git config --global user.name "xxx"$ git config --global user.email "[email protected]"121.2.生成SSH密钥过程: 1.2.1.检查是不是已经存在密钥(能进去说明已经存在,就删掉文件夹,重新创建): cd ~/.ssh1.3.生成 SSH 密钥: $

github入门:设置添加ssh key<转>

转自:http://blog.csdn.net/binyao02123202/article/details/20130891 很多朋友在用github管理项目的时候,都是直接使用https url克隆到本地,当然也有有些人使用 SSH url 克隆到本地.然而,为什么绝大多数人会使用https url克隆呢? 这是因为,使用https url克隆对初学者来说会比较方便,复制https url 然后到 git Bash 里面直接用clone命令克隆到本地就好了.而使用 SSH url 克隆却需要

使用Git Bash生成新的ssh key

使用Git Bash生成新的ssh key. $ cd ~  ///保证当前路径在"~"下 $ ssh-keygen -t rsa -C "你的邮箱地址"  ///建议填写自己真实有效的邮箱地址 结果: Enter file in which to save the key (/c/Users/xxxx_000/.ssh/id_rsa):   ///不填直接回车 Enter passphrase (empty for no passphrase):   ///输入密

(诊断)为GitHub添加SSH key时出现“Could not open a connection to your authentication agent”错误的应对方案(转)

在为windows 环境下的github账户添加SSH key时,需要在Git Bash执行如下命令: 第一步:检查已有的SSH keys $ ls -al ~/.ssh 第二步:生成新的SSH key $ ssh-keygen -t rsa -C "[email protected]" # Creates a new ssh key, using the provided email as a label # Generating public/private rsa key pai

【Android Studio 安装配置及第一次新建项目gradle配置介绍】(附最新as安装包及Gradle离线包)

转载请注明:http://blog.csdn.net/lrs123123/article/details/44901685 GFW让很多Android Developer 很是烦恼,先放上Android Studio 的最新版安装包吧 (1.1.0):http://pan.baidu.com/s/1dDvoErf    提取码:2dwn 下载安装完后,打开as你会发现第一个问题:一直停留在如下界面 解决的办法挺简单的,首先关闭安装向导,无法关闭在任务管理器中手工关掉进程,然后打开Android

github添加SSH Key

1.背景介绍 缘由:在github上下载goagent时出现错误. 在终端使用命令:git clone [email protected]:phuslu/goagent.git 会报权限错误如下: Cloning into 'goagent'... The authenticity of host 'github.com (192.30.252.128)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:6

为github添加ssh key

用git关联github上的远程仓库前需要先为github添加ssh key 一.检查本机是否生成ssh key 本地查找.ssh文件,其中id_rsa.pub中的内容就是ssh key 二.为github上的仓库添加ssh key 原文地址:https://www.cnblogs.com/2sheep2simple/p/10372391.html

github添加ssh key报错Key is invalid. Ensure you've copied the file correctly

github添加ssh key的时候报错:Key is invalid. Ensure you've copied the file correctly 将秘钥复制粘贴到文本编辑器中,再粘贴复制到 github添加ssh key报错Key is invalid. Ensure you've copied the file correctly

gitLab添加ssh key

电脑新装了一台虚拟机,想要和gitLab建立一个安全的ssh连接,步骤如下 1.本机生成ssh key 系统环境:Linux 使用root用户登录,执行命令:ssh-keygen -t rsa -C "[email protected]",默认回车就ok了,该命令会创建一个隐藏的.ssh文件夹,文件夹中有2个文件:id_rsa(私钥)和id_rsa.pub(公钥),使用命令:vi id_rsa.pub查看公钥内容,复制公钥内容. 2.gitLab添加ssh key  3.授权 chmo