http://help.github.com/linux-key-setup/
http://help.github.com/multiple-keys/
过程中,因注册用户名为fannyluo,
而本机用户名为user01,产生错误
需添加路径
$ ssh-add ~/.ssh/id_rsa
运行:
$ ssh -v git@github.com
OpenSSH_5.3p1 Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/user01/.ssh/identity type -1
debug1: identity file /home/user01/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/user01/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /home/user01/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user01/.ssh/id_rsa
debug1: Remote: Forced command: gerve fannyluo
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 277
Agent admitted failure to sign using the key.
debug1: Trying private key: /home/user01/.ssh/identity
debug1: Trying private key: /home/user01/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
user01@user01-laptop:~/.ssh$ chmod 700 ~/.ssh
user01@user01-laptop:~/.ssh$ chmod 600 ~/.ssh/*
user01@user01-laptop:~/.ssh$ ssh -v git@github.com
OpenSSH_5.3p1 Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/user01/.ssh/identity type -1
debug1: identity file /home/user01/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/user01/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /home/user01/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user01/.ssh/id_rsa
debug1: Remote: Forced command: gerve fannyluo
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 277
Agent admitted failure to sign using the key.
debug1: Trying private key: /home/user01/.ssh/identity
debug1: Trying private key: /home/user01/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
user01@user01-laptop:~/.ssh$ ssh-add ~/.ssh/id_rsa
Identity added: /home/user01/.ssh/id_rsa (/home/user01/.ssh/id_rsa)
user01@user01-laptop:~/.ssh$ ssh -v git@github.com
OpenSSH_5.3p1 Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/user01/.ssh/identity type -1
debug1: identity file /home/user01/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/user01/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /home/user01/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user01/.ssh/id_rsa
debug1: Remote: Forced command: gerve fannyluo
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Remote: Forced command: gerve fannyluo
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.utf8
PTY allocation request failed on channel 0
ERROR: Hi fannyluo! You've successfully authenticated, but GitHub does not provide shell access
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 2592, received 2904 bytes, in 0.8 seconds
Bytes per second: sent 3372.2, received 3778.2
debug1: Exit status 1
分享到:
相关推荐
### Git与GitHub学习笔记知识点详解 #### 一、Git版本控制系统概述 **1.1 Git简介** Git是一款分布式版本控制系统,由Linus Torvalds在2005年开发,用于Linux内核的开发。Git的主要特点包括支持离线开发、强大的...
### Git学习笔记——入门篇 #### 一、Git简介与安装 **Git**是一种分布式版本控制系统,用于跟踪计算机文件的变化,并协调多个用户之间的共享工作。它最初由Linus Torvalds于2005年创建,目的是为了更高效地管理...
### 2018尚硅谷Git和GitHub视频教程知识点概览 #### 一、为什么使用版本控制? 版本控制系统(Version Control System, VCS)是一种记录一个或若干个文件内容变化,以便将来查阅特定版本修订情况的系统。它帮助...
远程仓库是存放Git版本库的服务器,可以是本地网络中的服务器也可以是互联网上的公共仓库如GitHub。常用的远程仓库操作包括创建SSHKey、添加远程库、远程克隆、推送分支和抓取分支等。其中,SSHKey用于安全地访问...
### Git学习笔记 #### 一、版本控制系统概览 **版本控制系统**是一种记录一个或若干个文件内容变化,以便将来查阅特定版本修订情况的系统。根据存储方式的不同,版本控制系统可以分为两大类: 1. **集中式版本...
Win 10 ...Clone git repositories using ssh,clone前配置SSH key 1.本机生成密钥 ssh-keygen -t rsa -C 1********1@qq.com 连续回车后如下输出: 原创文章 40获赞 6访问量 2945 关注 私信 展开
- 添加新的远程仓库使用`git remote add <shortname> <url>`,例如:`git remote add origin https://github.com/user/repo.git`。 - 将本地分支推送到远程仓库使用`git push <shortname> <branchname>`。 - 克隆...
### Gitea:开源的Git服务平台 #### 引言 随着软件开发的复杂度日益增加,版本控制成为了软件开发流程中不可或缺的一部分。Git作为一种分布式版本控制系统,被广泛应用于软件开发领域,极大地提高了开发效率和协作...
【Git基础与博客搭建】 Git 是一款分布式版本控制系统,它允许开发者追踪代码的变化,并协同管理项目。对于想要搭建博客的朋友,尤其是使用...通过持续学习和实践,你可以更加熟练地运用Git来管理和维护你的博客。
Git和GitHub备忘单嗨,在那里,只是想学习git :) 这是我做的一些笔记,供您快速参考。Git命令如何使用Git将本地文件推送到GitHub 在GitHub上创建一个新的存储库在终端中使用以下命令: git init在当前文件夹中打开一...
标题“starter:这是我的git和github学习库”表明这个压缩包包含了与Git和GitHub学习相关的资源。这可能包括教程、示例代码、笔记或者实践项目的源码。"起动机"暗示这是一个入门或起点,适合初学者了解和掌握这两个...
5. Git错误处理:当Git提示"ssh: Could not resolve hostname github.com: Name or service not known."时,通常是DNS解析问题,可以通过检查网络设置或更新hosts文件来解决。 6. GCC编译错误:“未找到命令g cc”...
### TortoiseGit与msysGit安装及使用指南 #### 一、引言 ...这些基础操作是学习Git版本控制的重要起点,也是参与开源项目合作的基本技能之一。随着实践经验的积累,您可以进一步探索更高级的功能和技术。
2. **生成SSH密钥**:在Eclipse中设置SSH密钥,以便与GitHub进行身份验证。在`Window -> Preferences`中操作,具体步骤可参考相关教程。 3. **连接远程仓库**:使用egit,选择`Team -> Share Project`,输入远程...
一步步学习git的相关操作及多人协作开发 模拟环境如下: 机器三台:程序员A在公司的台式机(计算机名:A-company,系统:ubuntu16.04),程序员A在家里的笔记本(计算机名:A-home,系统:windows 10)。 B在公司的...
在IT领域,尤其是Unix/Linux和macOS系统中,...总的来说,dotfiles是个性化和优化开发者工作环境的关键,通过共享和学习他人的dotfiles,我们可以借鉴他们的经验,提高工作效率,并享受定制化的工作环境带来的便利。
网站 该网站是使用现代静态网站生成器构建的。 安装 yarn install ...GIT_USER=<Your> USE_SSH=true yarn deploy 如果您使用GitHub页面进行托管,则此命令是构建网站并推送至gh-pages分支的便捷方法。
当学习完一个知识点以后,自己做笔记,同时事后要总结,如果自己能把一个知识清晰表达出来的时候,自己也是有很大的收获和成长的; 赠人玫瑰手留余香。 目录 学习知识相关 Java 计算机基础(重要) 需要完善 需要...