git config --system --unset credential.helper 重新输入账号密码 core.autocrlf 配置 Git 处理行结束符

 Configuring Git to handle line endings - GitHub Docs https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

配置 Git 处理行结束符 - GitHub 文档 https://docs.github.com/zh/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

 

Windows文件 linux文件

Configuring Git to handle line endings - GitHub Docs https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

git config --global core.autocrlf true

 

 

检查本地配置
$ git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.autocrlf=false
user.name=start0627
user.email=start0627@BMC.com
remote.origin.url=http://amGITHUBpmOURgitlab:8060/start0627/mpBMCwepy.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
http.emptyauth=true


Administrator@PC MINGW64 /d/GPUGO/MP/wepy/mpBMCwepy (master)
$ git push origin master http://amGITHUBpmOURgitlab:8060/start0627/mpBMCwepy.git
error: src refspec http://amGITHUBpmOURgitlab does not match any.
error: failed to push some refs to 'origin'

Administrator@PC MINGW64 /d/GPUGO/MP/wepy/mpBMCwepy (master)
$ git remote add origin http://amGITHUBpmOURgitlab:8060/start0627/mpBMCwepy.git

Administrator@PC MINGW64 /d/GPUGO/MP/wepy/mpBMCwepy (master)
$ git push origin master
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://amGITHUBpmOURgitlab:8060/start0627/mpBMCwepy.git/'

解决方案:
1. 如果账号密码有变动 用这个命令 git config --system --unset credential.helper 重新输入账号密码 应该就能解决了

检查本地配置
$ git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.autocrlf=false
user.name=start0627
user.email=start0627@BMC.com
remote.origin.url=http://amGITHUBpmOURgitlab:8060/start0627/mpBMCwepy.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
http.emptyauth=true

 

 

$ git config --global user.name fengxiaole

$ git config --global user.email fengxiaole@t.com

win

$ git config --global core.autocrlf false

 

posted @   papering  阅读(18058)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
历史上的今天:
2017-09-01 不怕慢 就怕站 不怕单线程 不怕 裸露ip
2017-09-01 c rand 机制
2016-09-01 SET FOREIGN_KEY_CHECKS=0
2016-09-01 调度器 堆 优先级队列 数据结构的堆和栈 非完全二叉树 优先队列 堆队列优先队列
2016-09-01 a new way of thinking about a problem
2016-09-01 $this
点击右上角即可分享
微信分享提示