idea 配置 git 与 idea 登录不上git 问题

1 篇文章 0 订阅

1.安装git

Git 的 msysGit 官网下载:https://git-scm.com/
Git 客户端 TortoiseGit 官网下载:http://download.tortoisegit.org/tgit/

2.配置git

在这里插入图片描述

3.登录git

地址:https://github.com/
在这里插入图片描述
本地代码分享到git
在这里插入图片描述
导出到idea
在这里插入图片描述
在这里插入图片描述

历史版本查看
在这里插入图片描述

idea 登录不上git 问题

incalid authentication data.connection refused:connect
打开hosts文件:C:\Windows\System32\drivers\etc\hosts
在这里插入图片描述
登录成功后 上传至github

在这里插入图片描述
结果保错:

Can’t finish GitHub sharing process
Successfully created project ‘springboot’ on GitHub, but initial commit failed:
*** Please tell me who you are.

Run

git config --global user.email “you@example.com”
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <(null)>) not allowed
during executing git -c core.quotepath=false commit -m “Initial commit” –

打开GitHub,查看自己项目发现只创建了一个空的仓库,点击仓库名,进入仓库,

点击setting,拖动到最下面,点击delete this repository,输入仓库名称,点删除。

4、打开git安装目录,找到git bash,双击运行,执行命令

git config --global user.email “you@example.com”

git config --global user.name “Your Name”
上面的方法配置的是全局的用户名和邮箱!就是说如果没有单独为项目配置,那提交的所有项目全部都是这个名字和邮箱!不管是公司项目还是github,还是码云!

单独为项目配置的方法(全局和单独配置都存在的时候会默认使用项目单独配置的):

1.打开项目所在目录,找到隐藏的.git文件夹。注意这个文件夹是隐藏的,显示隐藏出来就行。

2.打开文件夹里的config文件,推荐用nodepad++打开。

3.添加这三行到文件:

[user]
name = XXX(自己的名称)
email = XXXX(邮箱)
当然也可以通过命令行的方式,只需要在 .git 文件夹下。 例如执行如下命令:

git config user.name “xxxxx”

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值