git服务器url改变发生Host key verification failed.

 

一、查看修改远程关联:

$ git remote -v
origin  ssh://git@xxxx/core.git (fetch)
origin  ssh://git@xxxx/core.git (push)

 二、直接push到新的url会发现Host key verification failed.

       要先:

git remote remove origin
git remote add origin 新仓库地址

或者VS自带团队资源管理器设置里

三、git pull 

Git: There is no tracking information for the current branch.

 有两种方法解决:

  1、先指定本地master到远程的master,然后再去pull:

git branch --set-upstream-to=origin/develop develop
git pull

  2、指定远程分支:

git pull origin develop

四、push

$ git push --set-upstream origin master
The authenticity of host 'xxxx ([xxxx)' can't be established.
ECDSA key fingerprint is SHA256:OAVmsLaMoFF/O3fVgF5Wb4dxjpxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxxx' (ECDSA) to the list of known hosts.

要输入yes!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值