公司服务器上的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的更多相关文章

  1. 新手git: ssh: connect to host localhost port 22: Connection refused

    由于gitlab上要git pull或者git clone,可是每次都出现这个问题.之前偶尔出现这个问题.可是仅仅是偶尔.这是为什么呢?然后就開始搜索网上的解决方式了. 这个问题搜索网上非常多答案.可 ...

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

    假设git例如,下面的问题时,远程推送: [fulinux@ubuntu learngit]$ git push -u origin master ssh: connect to host githu ...

  3. Ubuntu下 ssh : connect to host localhost port 22:Connection refused

    Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因 ...

  4. 运行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 ...

  5. ssh: connect to host localhost port 22: Connection refused

    1.hadoop安装好之后,执行ssh localhost无法执行, 提示“ssh: connect to host localhost port 22: Connection refused”. 2 ...

  6. ssh本机失败(ssh: connect to host localhost port 22: Connection refused)

    ssh本机失败(ssh: connect to host localhost port 22: Connection refused) 一. 问题描述 之前一直在服务上使用宝塔面板, 今天突发奇想, ...

  7. 阿里云配置通用服务的坑 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 ...

  8. 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 ...

  9. ssh: connect to host localhost port 22: Connection refused 问题

    错误原因:1.sshd 未安装2.sshd 未启动 3.防火墙 4需重新启动ssh 服务 解决方法:1.确定安装sshd: $ sudo apt-get install openssh-server ...

随机推荐

  1. poj 2528 线段树区间修改+离散化

    Mayor's posters POJ 2528 传送门 线段树区间修改加离散化 #include <cstdio> #include <iostream> #include ...

  2. Spark kafka flume

    Flume Flume 是一个分布式.可靠.和高可用的海量日志聚合的系统,支持在系统中定制各类数据发送方,通过监控整个文件目录或者某一个特定文件,用于收集数据:同时Flume也 提供数据写到各种数据接 ...

  3. UVA12325-注意提高效率的思路

    题目大意:你有一个体积为N的箱子和两种数量无限的宝物.宝物1的体积为S1,价值为V1:宝物2的体积为S2,价值为V2.输入均为32位带符号的整数.你的任务是最多能装多少价值的宝物?   方法:其实也没 ...

  4. linux 第一个知识点(my)

    关于Linux - rwx rwx rwx root user 194 Oct : 19  21:24 test -:此符号为文件名,如果是d 则为目录,如果是l 则为连接 rwx: 这是所有者所有的 ...

  5. python之路(列表,元组)

    列表 list:基础数据类型之一,可以索引,切片,步长,切片+步长可以增删改查,可迭代,可嵌套字典,元组,列表 一.索引,切片,步长 list01 = [1,2,3,'eric','west'] 1. ...

  6. Chrome 浏览器相关

    ********* 问题 ********* localhost 通常会使用加密技术来保护您的信息.Google Chrome 此次尝试连接到 localhost 时,此网站发回了异常的错误凭据.这可 ...

  7. 7-5 A除以B(10 分)

    真的是简单题哈 —— 给定两个绝对值不超过100的整数A和B,要求你按照“A/B=商”的格式输出结果. 输入格式:输入在第一行给出两个整数A和B(−100≤A,B≤100),数字间以空格分隔. 输出格 ...

  8. Linux的VMware虚拟机无法上网问题

    很多时候,Linux无法上网,不管改成nat模式还是主机模式都不行.这时候可以选择进行重置: 首先点击编辑,之后点击虚拟网络编辑器, 然后移除VMnet0和VMnet8网络,点击确定: 然后再打开虚拟 ...

  9. AcWing 1057. 股票买卖 IV

    //f[i,j,1]表示走到第i天已经进行完j次交易并且手中没有股票的所有的购买方式的集合 //f[i,j,0]表示走到第i天并且正在进行第j次交易且手中有货的所有的购买方式的集合 //属性利益最大值 ...

  10. 拦截器 Filter : js、css、jpg、png等静态资源不被拦截解决方案

    方案一: web.xml配置文件拦截范围缩小 ,没有必要 /*的配置拦截项目下所有资源. <filter> <filter-name>Login</filter-name ...