git常用命名和使用过程中遇到的问题

本文介绍了Git在使用过程中常见的错误及其解决方案,包括'fatal: unable to auto-detect email address'错误的两种修复方法,以及Ubuntu环境下'fatal: unable to access': 403错误的处理,同时提供了Git在Ubuntu上的安装和卸载步骤。对于开发者来说,理解并解决这些常见问题至关重要。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目录

0.git常用命名

1.fatal: unable to auto-detect email address

2.ubuntu git clone  fatal: unable to access The requested URL returned error: 403

3.git 安装和卸载


0.git常用命名

 

1.fatal: unable to auto-detect email address

错误产生说明:在使用git commit -m上传材料说明时,遇到问题:

*** 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: unable to auto-detect email address (got 'XXX@XXX-System-Product-Name.(none)')

解决方法1

找到工程目录的.git文件夹,打开之后找到config文件,在最后边加上一句话

[user]
	email = youremail
	name = yourname

your email 和your name随便写上就行

解决方法2:

在终端输入:

​#  git config --global user.email “你的邮箱”
#  git config --global user.name “用户名”

注意:方法一和方法二都可以使用一下,我在使用时,有时候只有方法一起作用;

2.ubuntu git clone  fatal: unable to access The requested URL returned error: 403

报错原因:在上传lfs文件时,输入三次密码,中途使用ctrl+c中断了push过程

验证错误:在别人的机器可以clone下文件,在自己的机器上不行;

解决办法:下载已有git,重新安装git

3.git 安装和卸载

安装:

sudo apt-get install git

卸载:

sudo apt autoremove git

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

猫猫与橙子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值