ssh: connect to git@gitlab.xxxxx.com:xxxxx.git port 22: Connection refused
公司服务器上的gitlab项目添加了ssh密钥,但是操作时却报错ssh: connect to git@gitlab.xxxxx.com:xxxxx.git port 22: Connection refused
经过研究发现gitlab不仅支持ssh也支持http链接获取项目:

将原来的ssh链接git@gitlab.xxxxx.com:xxxxx.git改成https的链接https://gitlab.xxxxxxxxx.com/xxxxxxxxx.git就行了
比如git clone https://gitlab.xxxxxxxxx.com/xxxxxxxxx.git 会提示你输入账号密码,这个账号密码就是登陆你们公司gitlab服务器时用的账号密码
如果之前本地有项目了则执行下面代码
查看本地项目对应的远程链接:git remote -v
将git@gitlab.xxxxx.com:xxxxx.git改成https的链接https://gitlab.xxxxxxxxx.com/xxxxxxxxx.git:
git remote set-url origin https://gitlab.xxxxxxxxx.com/xxxxxxxxx.git
然后就能正常push pull fetch了
ssh: connect to git@gitlab.xxxxx.com:xxxxx.git port 22: Connection refused的更多相关文章
- 新手git: ssh: connect to host localhost port 22: Connection refused
由于gitlab上要git pull或者git clone,可是每次都出现这个问题.之前偶尔出现这个问题.可是仅仅是偶尔.这是为什么呢?然后就開始搜索网上的解决方式了. 这个问题搜索网上非常多答案.可 ...
- ssh: connect to host github.com port 22: Connection refused
假设git例如,下面的问题时,远程推送: [fulinux@ubuntu learngit]$ git push -u origin master ssh: connect to host githu ...
- Ubuntu下 ssh : connect to host localhost port 22:Connection refused
Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因 ...
- 运行Hadoop start-all.sh遇到的错误ssh: connect to host localhost port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused 我的情况是ssh server没装,查看方法: ps -e |grep ssh 1 ...
- ssh: connect to host localhost port 22: Connection refused
1.hadoop安装好之后,执行ssh localhost无法执行, 提示“ssh: connect to host localhost port 22: Connection refused”. 2 ...
- ssh本机失败(ssh: connect to host localhost port 22: Connection refused)
ssh本机失败(ssh: connect to host localhost port 22: Connection refused) 一. 问题描述 之前一直在服务上使用宝塔面板, 今天突发奇想, ...
- 阿里云配置通用服务的坑 ssh: connect to host 47.103.101.102 port 22: Connection refused
1.~ wjw$ ssh root@47.103.101.102 ssh: connect to host 47.103.101.102 port 22: Connection refused ssh ...
- scp出现ssh port 22: Connection refused 问题解决具体步骤
[root(0)@sys11 09:20:29 /home/work/Code_release/bj]# scp ./release.sh root@192.168.161.151:/Users/a ...
- ssh: connect to host localhost port 22: Connection refused 问题
错误原因:1.sshd 未安装2.sshd 未启动 3.防火墙 4需重新启动ssh 服务 解决方法:1.确定安装sshd: $ sudo apt-get install openssh-server ...
随机推荐
- Missing artifact com.oracle:ojdbc14:jar:10.2.0.1.0
问题说明:导入Maven项目时,想要添加Oracle驱动包时,Maven的pom.xml总是报Missing artifact com.oracle:ojdbc14:jar:10.2.0.1.0错. ...
- c# 使用T4模板生成实体类(sqlserver)
新建类库,右键添加 "文本模板" 添加完成之后生成如下后缀为 tt的文件: 双击文件:TextTemplate_Test.tt 文件打开,替换代码如下 <#@ templat ...
- js替换时,空格被替换为双引号
替换代码 str.replace(/\"/g, "'") 将双引号替换为单引号,如果字符串中,存在space(空格)时,使用以上语句将会导致空格被替换为双引号,可以使用如 ...
- 曼孚科技:AI算法领域常用的39个术语(下)
算法是人工智能(AI)核心领域之一. 本文整理了算法领域常用的39个术语,希望可以帮助大家更好地理解这门学科. 本文为下半部分,上半部分见本账号上一篇文章. 19.迁移学习(Transfer Lear ...
- css中content-box和border-box当宽度为百分比时的位置区别,vw和%区别
盒模型 参考代码 // CSS 部分 <style> .box1,.box2{ width: 200px; height: 200px; padding: 20px; margin: 20 ...
- JavaScript 自适应轮播图
代码 话不多说,先上代码,方便复制粘贴.演示 <!DOCTYPE html> <html lang="en"> <head> <meta ...
- map/reduce+lambda让程序简单化
map()函数 map()函数接收两个参数,一个是函数,一个是Iterable,map将传入的函数依次作用到序列的每个元素,并把结果作为新的Iterator返回. 也就是 map(f,[x,x,x, ...
- java中数据类型转换注意事项
1.byte.short.char这三种类型互相做数学运算时都会先提升为int类型后再做运算 char a = 'A'; short b = 1; int num = a + b;//a和b在做运算前 ...
- 转: VS 解决方案目录结构设置
https://www.cnblogs.com/zuibunan/p/3843459.html 下面的文章也有介绍 https://blog.csdn.net/lp310018931/article/ ...
- react-路由和Ant design
路由的使用 react-router import React from 'react' // 如果要使用 路由模块,第一步,运行 yarn add react-router-dom // 第二步,导 ...