【Git】Gitee免密push(TencentCloudLinux)

这篇具有很好参考价值的文章主要介绍了【Git】Gitee免密push(TencentCloudLinux)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

前提:

我用的是腾讯云的Centos(Linux)服务器
我创建好了仓库
我配置过git 可以正常用密码push
以上自行解决
我们直接配置公钥解决免密push

1.在服务器上创建公钥

在用户根目录创建 公钥 邮箱写自己的 随意写 我写的是gitee绑定的邮箱

ssh-keygen -t ed25519 -C "820649664@qq.com"

回车三次形成密钥

2.查看.ssh

.ssh在 你的仓库文件同目录下
例如我的本地文件夹是GiteeLinux,.ssh跟GieeLinux同目录是隐藏文件

ll .ssh

【Git】Gitee免密push(TencentCloudLinux)
id_ed25519是私钥
id_ed25519.pub是公钥

3.查看公钥

cat id_ed25519.pub

复制ssh-ed25519 …820649664@qq.com的密钥

4.去gitee中添加密钥

将复制的公钥 去【设置】>【SSH公钥】>【添加】
【Git】Gitee免密push(TencentCloudLinux)

5.回终端确定

在终端执行以下命令

ssh -T git@gitee.com

回复yes
【Git】Gitee免密push(TencentCloudLinux)

如果成功则出现以下文字

Warning: Permanently added ‘gitee.com,212.64.63.215’ (ECDSA) to the list of known hosts.
Hi Meaning! You’ve successfully authenticated, but GITEE.COM does not provide shell access.文章来源地址https://www.toymoban.com/news/detail-442213.html

6.恭喜你可以免密push了

到了这里,关于【Git】Gitee免密push(TencentCloudLinux)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • git push时报错error: failed to push some refs to ‘https://gitee.com/**.git‘的解决方案

    今天小编在学习git中报错遇到这样的问题,如下图 问题弄得小编很是烦恼。经过查阅资料找到了问题的解决方案,下面就来一起解决这个问题吧 成因: 可能 是因为在手动修改了远程仓库中的文件,导致一些文件在本地仓库和远程仓库上不一致,故而引发该错误。当然也有可

    2024年02月11日
    浏览(45)
  • git使用push命令报错-error: failed to push some refs to ‘https://gitee.com/MFLU/graduation_design.git‘

    当我们使用git操作向远程仓库push代码时,可能会报错: hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., \\\'git pull ...\\\') before pushing again. hint: See the \\\'Note about fast-forwards\\\' in \\\'git push --help\\\' for details. 主要原因

    2024年02月04日
    浏览(34)
  • git上传文件到Gitee报错“error: failed to push some refs to ‘https://gitee.com/xxxx”

    我要将一个 4.27 GB 的文件上传到 Gitee 上,但是出现了下面这样的报错 error: failed to push some refs to \\\'https://gitee.com/xxxx/centos.git 因此记录一下解决报错的方法。 创建一个新的项目仓库,可以参考我之前写的博客Pycharm集成Gitee及使用,我这里新建了一个名字为 Centos 的仓库。 1、在

    2024年02月12日
    浏览(44)
  • git使用git push -u origin master提交远程仓库时报错error: failed to push some refs to ‘‘https://gitee.com/xx报错解决

            今天使用git将项目提交远程仓库时报错了,报错如下:         error: failed to push some refs to \\\'https://gitee.com/wang-junyanga/qiuy.git\\\'  出现问题前的操作:         我再 gitee 中初始化了一个名字为 Qiuy 的仓库,里面有一个默认的分支为 master,我想要将本地仓库中的名为

    2024年02月16日
    浏览(47)
  • git push 报错unable to access https://gitee.com/****/***.git/ : The requested URL returned error:403

    对于git小白来说,第一次使用git总会报各种稀奇古怪的错误。 最近的操作git的时候,就报了如上的错误fatal: unable to access  https://gitee.com/****/***.git/ : The requested URL returned error:403 对于这样的错误无非就是无权访问的问题, 解决的方法我试过的只有两种 : 1 .自己的git账户本身

    2023年04月08日
    浏览(35)
  • 解决error: failed to push some refs to ‘https://gitee.com/xxx.git‘

    在 git 执行命令git push origin master时候报错 error: failed to push some refs to \\\"https://gitee.com/xxx.git\\\" 根本原因是远程仓库和本地仓库内容不同,将远程仓库中不同的内容pull到本地,就好了。 解决方法: 将初始化文件同步到本地,然后再次执行 git push origin master

    2024年02月12日
    浏览(38)
  • error: failed to push some refs to ‘https://gitee.com/xxx/practice.git‘

    error: failed to push some refs to \\\'https://gitee.com/xxx/practice.git\\\'  To https://gitee.com/xxx/practice.git hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing ! refs/heads/master:refs/heads/master [rejected] (fetch first) hint: to the same ref. You may want

    2024年02月03日
    浏览(27)
  • linux下gitee免密提交设置

    gitee上创建仓库: SSH 远程连接 点击右边的复制,复制SSH地址。 (HTTPS的连接方式每次都需要输入码云的用户名和密码。) 在什么用户下提交,就在什么用户下执行设置命令 root用户: 1.设置密钥 ssh-keygen 由于我以前配置过一次,所以会让选择一次,选择y重新配置的密钥会覆

    2024年02月10日
    浏览(16)
  • gitee linux免密/SSH 方式连接免登录

    注意: {your username} 、 {your password} 中的特殊字符需要转义。 @ 转义为 %40 。 输入一次用户名和密码时,会自动记录到这个文件。 缺点:明码保存。 https:// 开头的URL,使用账号密码方式免登录 通过 ssh-keygen 程序创建 找到SSH公钥 id_rsa.pub 是公钥 id_rsa 是私钥 详细参考:https:/

    2024年02月13日
    浏览(28)
  • 完成Centos上使用SSH公钥进行免密上传文件到gitee的步骤后,测试免密推送到gitee的时候还是需要输入邮箱和密码

    如果你已经按照正确的步骤设置了SSH公钥并进行了免密测试,但仍然需要输入邮箱地址和密码才能推送到gitee,那么可能有以下几种原因: 您可能没有使用SSH URL来推送代码。请确保您使用的是SSH URL而不是HTTPS URL来推送代码。您可以使用命令 git remote -v 来查看当前仓库的远程

    2024年02月09日
    浏览(25)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包