git push报错git@github.com: Permission denied (publickey).

2024-05-07 17:52

本文主要是介绍git push报错git@github.com: Permission denied (publickey).,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
  • 已经使用git config设置邮箱和密码,可以说使用git config --list查看,用ssh-keygen生成密钥x_github_idrsa,并将x_github_idrsa.pub内容复制进github
Generating public/private rsa key pair.
Enter file in which to save the key (/home/x/.ssh/id_rsa): x_github_idrsa
  • 使用ssh_add报错
ssh-add ~/.ssh/x_github_idrsa
Could not open a connection to your authentication agent.
正确案例:Identity added:xxxxxx

正确处理方法

https://stackoverflow.com/questions/17846529/could-not-open-a-connection-to-your-authentication-agent

  • 先打开ssh_add,再添加密钥就可以使用git push了
eval `ssh-agent -s`
ssh-add
ssh-add ~/.ssh/x_github_idrsa

参考文章Git使用出现git@github.com: Permission denied (publickey). 处理https://blog.csdn.net/qq_43768946/article/details/90411154
用一下git push能出这么多问题是没想到的,stackoverflow还是好用
https://stackoverflow.com/questions/13509293/git-fatal-could-not-read-from-remote-repository
实在不行删除.ssh文件夹里的known_hosts,每次连接应该会重新生成,要不删除ssh_key再重新生成复制进github

这篇关于git push报错git@github.com: Permission denied (publickey).的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/967970

相关文章

yum install 失败报错`XZ_5.1.2alpha' not found (required by /lib64/librpmio.so.3)

/export/env/py3.6/lib/liblzma.so.5: version `XZ_5.1.2alpha' not found (required by /lib64/librpmio.so.3)   到/export/env/py3.6/lib cp /lib64/liblzma.so.5.2.2 . sudo ln -s -f liblzma.so.5.2.2 liblzm

Git的安装以及使用

一.简单介绍 1.1版本控制 版本控制是指对软件开发过程中各种程序代码,配置文件及说明文档等文件变更管理,是软件配置管理的核心思想之一。 版本控制最重要的内容是追踪文件的变更,它将什么时候,什么人更改了文件的什么内容等信息忠实的记录下来。除此之外,版本控制的另一重要的功能是并行开发。软件开发往往是多人协同作业,版本控制可以有效地解决版本的同步以及不同开发者之间的开发通信问题,提高开发效率。

BD错误集锦7——在集成Spring MVC + MyBtis时使用c3p0作为数据库时报错Method com/mchange/v2/c3p0/impl/NewProxyPreparedStatem

异常信息如下: Type Exception ReportMessage Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyPreparedStatement.isClosed()Z is abstractDescr

BD错误集锦6——【IDEA报错】tomcat server功能无效,报错Java EE: EJB, JPA, Servlets

在网上查找原因,发现是非法关闭IDEA导致的。 Open Settings | Plugns and enable it. 在设置中enable JAVA EE和tomcat server即可。 参考: https://stackoverflow.com/questions/43607642/intellij-idea-plugin-errorproblems-found-loadin

Git代码管理的常用操作

在VS022中,Git的管理要先建立本地或远程仓库,然后commit到本地,最后push到远程代码库。 或者不建立本地的情况,直接拉取已有的远程代码。 Git是一个分布式版本控制系统,用于跟踪和管理文件的变化。它可以记录文件的修改历史,并且可以轻松地回滚到任何历史版本。 Git的基本概念包括: 仓库(Repository):Git使用仓库来存储文件的版本历史。一个仓库可以包含多个文件

通过sockst下载git

设置 Git 使用 SOCKS5 代理 git config --global http.proxy “socks5://localhost:1080” git config --global https.proxy “socks5://localhost:1080” 克隆仓库 git clone https://github.com/odoo/odoo.git 取消代理设置(可选) g

关于文章“python+百度语音识别+星火大模型+讯飞语音合成的语音助手”报错的修改

前言 关于我的文章:python+百度语音识别+星火大模型+讯飞语音合成的语音助手,运行不起来的问题 文章地址: https://blog.csdn.net/Phillip_xian/article/details/138195725?spm=1001.2014.3001.5501 1.报错问题 如果运行中报错,且报错位置在Xufi_Voice.py文件中的pcm_2_wav,如下图所示

git clone [github]下载速度慢问题解决

将下面两个ip加入HOST 192.30.253.113 github.com 151.101.185.194 github.global.ssl.fastly.net 如果不起作用,登录 http://github.com.ipaddress.com/ (需要翻墙)输入 github.global.ssl.fastly.net 和 github.com查询对应的ip,修改host文件中的i

文件权限修改为777,php failed to open stream: Permission denied

记录一次在谷歌云上的异常诡异的事件: 环境 centos7.5 nginx php7.0 mysql 问题: 问题一 我用相同的nginx配置,只是修改了nginx root目录。 打开/var/www/html/ 这个目录就报 2018/06/22 04:35:03 [error] 15840#0: *438 FastCGI sent in stderr: “Primary scr

git fetch.git merge,git pull

git fetch origin branch1:branch2 首先执行上面的fetch操作 使用远程branch1分支在本地创建branch2(但不会切换到该分支),  如果本地不存在branch2分支, 则会自动创建一个新的branch2分支,  如果本地存在branch2分支, 并且是`fast forward', 则自动合并两个分支, 否则, 会阻止以上操作. Git pus