GitLab(Git)生成与添加密钥

生成密钥

ED25519 SSH keys

更加安全的新密钥

ssh-keygen -t ed25519 -C "<comment>"

-C后面可以跟email邮箱作为label

Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_ed25519):

RSA SSH keys

使用2048bits

ssh-keygen -t rsa -b 2048 -C "email@example.com"

-C后面可以跟email邮箱

Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):

添加密钥

首先保证已经创建好了密钥

使用不同的方式打开文件,能看到文件内容就行

macOS:

pbcopy < ~/.ssh/id_ed25519.pub

Linux (requires the xclip package):

xclip -sel clip < ~/.ssh/id_ed25519.pub

Git Bash on Windows:

cat ~/.ssh/id_ed25519.pub | clip

复制添加

SSL certificate problem: self signed certificate

问题原因:没有正确的SSL证书

解决方法:

1、定义全局git repo

export GIT_SSL_NO_VERIFY=true

2、关闭SSL检查

git config --global http.sslVerify false

__EOF__

本文作者Lian_tiam
本文链接https://www.cnblogs.com/ancientlian/p/17049871.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   Lian_tiam  阅读(864)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示