ssh: connect to host github.com port 22: Connection refused
2015-09-25 14:54
495 查看
假设git例如,下面的问题时,远程推送:
能够採用例如以下方法:
測试连接是否成功:
推送:
[fulinux@ubuntu learngit]$ git push -u origin master ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
能够採用例如以下方法:
[fulinux@ubuntu ~]$ vim .ssh/config Host github.com User fulinux@sina.com Hostname ssh.github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Port 443
測试连接是否成功:
[fulinux@ubuntu ~]$ ssh -T git@github.com Hi fulinux! You've successfully authenticated, but GitHub does not provide shell access.
推送:
[fulinux@ubuntu learngit]$ git push -u origin master The authenticity of host '[ssh.github.com]:443 ([192.30.252.151]:443)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[ssh.github.com]:443,[192.30.252.151]:443' (RSA) to the list of known hosts. Counting objects: 23, done. Delta compression using up to 2 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (23/23), 1.87 KiB | 0 bytes/s, done. Total 23 (delta 6), reused 0 (delta 0) To git@github.com:fulinux/learngit.git * [new branch] master -> master Branch master set up to track remote branch master from origin.
相关文章推荐
- Java Web开发之访问路径问题分析
- 一步一图一代码,一定要让你真正彻底明白红黑树
- Java Clone, Shallow Copy and Deep Copy
- C# Lpt 并口热敏小票打印机打印位图
- ubuntu14安装php模块报错
- C语言printf
- JAVA反射例子
- C++ 嵌套类使用(二)
- An internal error occurred during: "Initializing Java Tooling".
- PHP中的Session对象如何使用
- C++ 嵌套类使用(一)
- Java基础知识强化85:System类之arraycopy()方法(数组拷贝)
- 建立基于虚拟用户的VSftpd服务
- Java产生随机数和随机字母的方法
- binbinyang---eclipse中show whitespace characters按钮编辑器中显示导致恶心的乱码
- C#默认参数
- java的system.arraycopy()方法
- Django Meta内部类选项
- 浅论Maven和Git的原理及展示其与Eclipse的集成
- C语言 判断两个矩形是否相交