博客
关于我
idea中push代码失败问题解决
阅读量:770 次
发布时间:2019-03-21

本文共 658 字,大约阅读时间需要 2 分钟。

解决方法如下:

: 1. 生成SSH authentication keys**

用以下命令生成SSH密钥公钥和私钥:

ssh-keygen -t rsa

按照提示一步步操作,默认情况下会生成一对Public key和Private key,分别保存在~/.ssh/id_rsa~/.ssh/id_rsa.pub文件中。

: 2. 配置GitHub账号**

登录GitHub账户,进入账户设置(Validation Settings),找到“Authentication”或“Passwords”选项,找到“Add public key”部分。

!:** 请注意**:请手动添加生成的id_rsa.pub文件内容到GitHub账目中。

: 3. 配置工具(如IDEA)使用Private key**

进入IDE设置中,找到关于Git的配置项。进入git settingsrepositories settings,选择"Add"按钮并输入私钥内容。

: 4. 克隆或提交代码**

已经准备好了?那就可以通过SSH方式直接进行git操作了。

如果你曾经使用过HTTP克隆(比如https://github.com/username/project.git),请打开८.git/config文件,将urlhttps://github.com/username/project.git修改为git@github.com:username/project.git

这样你就能通过SSH安全地向GitHub提交代码了。

转载地址:http://wgsgz.baihongyu.com/

你可能感兴趣的文章
Oracle:ORA-00911: 无效字符
查看>>
Text-to-Image with Diffusion models的巅峰之作:深入解读 DALL·E 2
查看>>
TCP基本入门-简单认识一下什么是TCP
查看>>
tableviewcell 中使用autolayout自适应高度
查看>>
Orcale表被锁
查看>>
svn访问报错500
查看>>
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
查看>>
org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
查看>>
org.apache.poi.hssf.util.Region
查看>>
org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
查看>>
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
查看>>
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
查看>>
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
查看>>
SQL-CLR 类型映射 (LINQ to SQL)
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded
查看>>
org.tinygroup.serviceprocessor-服务处理器
查看>>
org/eclipse/jetty/server/Connector : Unsupported major.minor version 52.0
查看>>
org/hibernate/validator/internal/engine
查看>>