当前位置: 首页 > news >正文

【已解决】could not read Username for ‘https://x.x.x‘: No such device or address

一、问题

运行 git 命令时报错:

  • 第一次:Authentication failed for ‘https://x.x.x/x/x.git/’
  • 第2+次:fatal: could not read Username for ‘https://x.x.x’: No such device or address

二、分析

关键词:authentication、username
可知与 git 用户权限相关,且是 https 方式

三、解决

只针对当前项目:项目根目录下执行:

git config user.name 'myname'
git config user.email 'myemail@x.x'
git config user.password 'mypassword'

更改后查看
cat .git/config
AI写代码
bash
1
更改全局配置:

git config --global user.name 'myname'
git config --global user.email 'myemail@x.x'
git config --global user.password 'mypassword'

查看:

git config --global user.name
git config --global user.email

但有时候还是不行,比如在 linux 系统中,可以尝试重新克隆:

git clone https://myname:mypassword@x.x.x/x/x.git

其他操作也可一试,但。。。:

git remote add origin https://myname:mypassword@x.x.x/x/x.git
git remote pull origin https://myname:mypassword@x.x.x/x/x.git
git remote push origin https://myname:mypassword@x.x.x/x/x.git

参考:原文链接:https://blog.csdn.net/qq_32682301/article/details/124810534

http://www.dtcms.com/a/358014.html

相关文章:

  • 关于docker启动容器立即线下的错误解决
  • C++之stack类的代码及其逻辑详解
  • 3D生成模型-NeRF:用神经辐射场定义视图合成
  • MySQL數據庫開發教學(四) 後端與數據庫的交互
  • React Hooks深度解析与最佳实践:提升函数组件能力的终极指南
  • 科技信息差(8.30)
  • 聊一聊耳机串扰-Crosstalk
  • 知料觅得-新一代AI搜索引擎
  • RK3576开发板串口配置及使用
  • STM32 之GP2Y1014AU0F的应用--基于RTOS的环境
  • 在 Git Bash 中查看 Git 仓库远程地址
  • flink中 Lookup Join和Interval Join和Regular Join使用场景与对比
  • 【云原生】Docker 搭建Kafka服务两种方式实战操作详解
  • 阿里云如何申请免费的ssl证书并部署
  • 嵌入式Linux驱动开发:ICM20608六轴传感器SPI驱动
  • 期刊 | 《电讯技术》期刊2025年投稿指南总结
  • 硬件SPI读写W25Q64
  • 北京交通大学:LLM的agent推理框架综述
  • 算法复习笔记: 双指针_二分查找篇
  • 详解推测性采样加速推理的算法逻辑
  • Kafka 消费模型
  • 本地运行的检索PDF文件中出现关键字的python程序
  • 2025年如何批量下载雪球帖子和文章导出pdf?
  • 2025 批量下载雪球和东方财富帖子和文章导出excel和pdf
  • kind集群应用
  • 《云原生架构从崩溃失控到稳定自愈的实践方案》
  • 「鸿蒙系统的编程基础」——探索鸿蒙开发
  • 第12章:推荐算法与实践
  • 科技感网页计时器.html
  • 设计模式:抽象工厂模式(Abstract Factory Pattern)