runinrain

博客园 首页 新随笔 联系 订阅 管理

如何进入code管理:

你先登录进去,然后直接访问https://code.aliyun.com,登录你的账户信息
码云直接搜索登录

生成多git角色需求

公司有代码库,自己的代码库....融合

如何生成SHH公匙

ssh-keygen -t rsa -C "emil地址"(在第二步命名文件的名称)

问题解决方法,
1.git pull --tags origin test Unable to negotiate with 47.98.49.44 port 22:
如何解决:在config文件配置

Host *
	HostkeyAlgorithms +ssh-rsa
	PubkeyAcceptedKeyTypes +ssh-rsa

2.Host key verification failed. fatal: Could not read from remote repository.
如何解决:

ssh-keyscan -H 你要放行的地址 >> ~/.ssh/known_hosts
ssh -T 你要放行的地址    (在第二步打出yes)

3.git@code.aliyun.com: Permission denied (publickey). fatal: Could not read from remote repository.
如何解决:
检查阿里云的ssh配置是否正确/ssh已经失效,我这里是企业和个人的配置成相同的ssh导致
4.ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not read from remote repository.
如何解决:同上3

阿里云配置ssh位置:
在这里插入图片描述
码云配置位置
在这里插入图片描述

如何配置config

麻烦的

Host gitee.com
  HostName gitee.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa
#code.aliyun.com
Host code.aliyun.com
  HostName code.aliyun.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa_yuegitee

简单的,一步到位
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa


欢迎点赞收藏评论


posted on 2025-02-08 11:45  不确定因素  阅读(19)  评论(0)    收藏  举报