ssh: connect to host gitlab.alpha.com port 22: Network is unreachable

在这里只说明我遇到的问题和解决方法,可能并不能解决你遇到的问题:

git clone git@gitlab.alpha.com:ipcam/ambarella.git
Cloning into ‘ambarella‘...
ssh: connect to host gitlab.alpha.com port 22: Network is unreachable
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

1、检查网络是否可以ping 通

  ping xxx.xxx.xxx.xxx

2、查看/etc/network/interfaces

  address 一栏和要下载的code server是否在同一网段

3、不在同一网段添加路由
  sudo route add default gw xxx.xxx.xxx.xxx

原文地址:https://www.cnblogs.com/Malphite/p/10471694.html

时间: 2024-08-09 23:02:49

ssh: connect to host gitlab.alpha.com port 22: Network is unreachable的相关文章

hadoop启动start-all.sh出错(master: ssh: connect to host master port 22: Connection refused)

当我们打开系统输入hadoop启动命令start-all.sh时出现以下错误: [[email protected] ~]# start-all.sh starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-master.out master: ssh: connect to host master port 22: Network is unreachable master: ss

git clone遇到的[ssh: connect to host github.com port 22]

起因 在学习递归的时候,对汉诺塔小研究了一番,参考网上写了个demo,后面就想同步到github. 过程 这台电脑是新电脑,所以需要先本地生成ssh key:ssh-keygen -t rsa -C "[email protected]"可参考-远程仓库.第一步:ssh-keygen -t rsa -C "[email protected]":第二步:在用户目录下,找到.ssh文件夹下的id_rsa.pub,打开先复制全部内容:第三步:登录github,个人帐号se

ssh: connect to host localhost port 22: Connection refused (2)

命令:ssh localhost 错误信息:ssh: connect to host localhost port 22: Connection refused 错误原因: 1.sshd 未安装 2.sshd 未启动 3.防火墙 解决方法: 1.确定安装sshd:  sudo apt-get install openssh-server 2.启动sshd: net start sshd 3.检查防火墙设置 检验方法: 输入命令:ssh localhost 若成功,则表示安装成功,且连接通过: 转

ssh: connect to host github.com port 22: Connection refused

假设git例如,下面的问题时,远程推送: [[email protected] 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 reposit

github连接报"ssh: connect to host github.com port 22: Connection timed out"错误

1. 异常 在连接github时,执行"ssh -T [email protected]" 命令时,出现 ssh: connect to host github.com port 22: Connection timed out 1 2. 解决方法 在存放公钥私钥(id_rsa和id_rsa.pub)的文件里,新建config文本,内容如下: Host github.comUser YourEmail@163.comHostname ssh.github.comPreferredAut

服务器22端口连接超时 ssh: connect to host *** port 22: Operation timed out

最近酸酸乳出问题,连接v社服务器发现碰到 ssh: connect to host master port 22: Connection timed out 的问题.现在对该问题做一下可能出现的问题 的总结和解决办法: 一.IP配置错误. 当出现上述错误时,首先检查网络连通情况,Ping一下远程登录的目标主机,如果ping不通,很有可能 是/etc/hosts文件中的IP地址映射出现问题,需要仔细检查名称和IP地址的映射关系. 二.防火墙问题. 当发现IP配置没有错误时,我们需要检查端口是否被防

github默认端口22被占用,ssh: connect to host github.com port 22: Connection timed out

出现github 连接错误: ssh:connect to host github.com port 22:Connection timed out 刚开始以为是网络问题,github不能连接上,但是使用ssh命令,用端口443测试发现可以连接上github ssh -T -p 443 [email protected] Enter passphrase for key '/root/.ssh/id_rsa': Hi yinfei1! You've successfully authentica

SSH远程连接报错:Could not connect to '10.43.2.113' (port 22): Connection failed.

昨天Xshell远程连接我的本地虚拟机:10.43.2.113很正常,今天尝试了好几次都连接不上,如下图所示 登陆到虚拟机查看目前服务器开放的端口:ss -lnt 竟然没有22端口,那不就是说我的SSH服务没有启动么?可是昨天我远程连接没有任何问题,而且根本就没有关闭ssh服务,不管怎么说,既然服务没有启动,那就启动SSH服务,启动过程报错如下图所示: 呵呵,看到这,终于知道是什么原因造成我不能远程登陆了,昨天为了给mysql用户对mysql的数据目录有相关的权限,执行了chown –R mys

Could not connect to '172.18.253.2' (port 22): Connection failed.

cisco交换机SSH登陆故障 一.故障现象 使用SSH登陆交换机时,出现如下提示 Connecting to 172.18.253.2:22... Could not connect to '172.18.253.2' (port 22): Connection failed. 二.故障排除 使用console口登陆交换机,查看登陆配置,配置了VTY 0 - 4 line vty 0 4 exec-timeout 0 0 login local ! 使用show ssh查看vty下的用户数量.