问题描述
我在尝试根据以下方法将存储库从 gitea 迁移到 gitlab 时遇到证书问题:
- 在 Gitlab 中创建一个新用户组
my_team
并使用适当的名称。 - 在 Gitlab 中创建一个与要迁移的名称相同的空白存储库,例如
my_repo
。 - 在我的存储库的本地副本中,使用
git checkout branch-name
以及所有带有git fetch --tags
的标签获取所有相关分支。 - 使用
git remote remove origin
删除现有遥控器。 - 使用
ssh-keygen -t ed25519 -C "<comment>"
生成新的密钥对。 - 通过单击我的 avantar(将我带到
User settings
)然后导航到左侧菜单上的SSH key
,将公钥复制到 Gitlab。将密钥粘贴到相应的字段中,然后点击Add key
按钮进行确认。 - 在本地机器上,使用 git-bash 添加一个新的远程:
git remote add origin https://www.<my_gitlab_site>:3080/my_team/my_repo.git
。 - 推送所有分支:
git push -u origin --all
- 推送所有标签
git push -u origin --tags
我现在被困在第 8 步中
$ git push -u origin --all
fatal: unable to access 'https://www.<my_gitlab_site>:3080/my_team/my_repo.git/':
error setting certificate verify locations: CAfile: ../git-certs/cert.pem CApath: none
denied
我确实在不同团队所在的同一目录中有一个文件 basedir/git-certs/cert.pem
,即 basedir/my_team/my_repo
和其他。我的其他存储库需要此证书。我现在的问题是,我不明白为什么我的本地 git 尝试再次验证 cert.pem
。
my_team/my_repo/.git/.config
只包含:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://www.<my_gitlab_site>:3080/my_team/my_repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
一种肮脏的解决方法是 git config http.sslVerify false
,我不打算这样做。我还有哪些其他选择?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)