WechatIMG1442.jpeg

场景

实现 Git Gitee仓库自动部署,使用 www-data 用户拉取代码时,每次都要设置全局 git 用户信息。

错误

$ cat /var/log/webhooks.log
From gitee.com:xoncology/shjyzxk* branch            zhangyuhai -> FETCH_HEAD
warning: unable to access '/root/.config/git/attributes': Permission denied
*** Please tell me who you are.
Rungit 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 'www-data@iZuf68boltvbz79cxbsunfZ.(none)')

查看 webhooks 日志文件,返回fatal: unable to auto-detect email address

解决

  • 查看当前项目 git 信息
$ git config --local -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@gitee.com:xoncology/shjyzxk.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.test.remote=origin
branch.test.merge=refs/heads/test

看到并没有全局用户信息。

  • 设置全局用户信息
$ git config --global user.email "you@domain.com" && git config --global user.name "dev"

执行上面命令设置后,还是不能成功拉取。

  • 直接替换全局用户信息
$ git config --replace-all user.email "you@domain.com" && git config --replace-all user.name "github_username"
  • 再次查看当前项目 git 信息
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@gitee.com:xoncology/shjyzxk.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.test.remote=origin
branch.test.merge=refs/heads/test
user.email=you@domain.com
user.name=github_username

看到已成功返回全局用户信息,再次尝试提交代码,服务器可以自动拉取。


http://www.taodudu.cc/news/show-4535407.html

相关文章:

  • String以及StringBuffer的基本操作
  • 02_C++实现多线程服务器代码(linux系统)
  • 关于对接芝麻 GO 的几点问题
  • Datawhale-Pandas中文教程[9]
  • c++ 3D笔记整理
  • 【论文阅读】PGM-index
  • 信道模型:Rayleigh、Rician、卫星→地面:Shadowed-Rician
  • linux将文件 abc 更名为 bca.,Linux命令行操作文本文件
  • nacos server 安装报错 macOS 10.12.6
  • linux服务器配置和管理,Linux服务器配置和管理:一般管理
  • python的八大排序算法
  • java证书加签_证书加签、验签、加密、解密Demo
  • 【CVPR 2021】Knowledge Review:知识蒸馏新解法
  • 机器学习和数据比赛资料汇总(转载)
  • python raise函数
  • python里raise是什么意思_python raise有什么用
  • python中assert是什么意思_python assert函数是什么以及如何使用?
  • python中finally是什么意思_什么是pythontry-finally语句?它能起到什么样的作用?
  • python raise和except区别_Python3 try-except、raise和assert解析
  • python raise和except区别_python raise和assert的区别
  • python的invalid syntax是什么意思_python 中 出现 invalid syntax 是什么意思 我是新手 求告知。...
  • Raise抛出异常
  • python异常模块raise的概念以及基本用法
  • python中箭头是什么意思_python流程框里面的箭头是什么意思
  • python中zerodivisionerror是什么意思-python里的raise是什么意思
  • python里raise是什么意思_Python中raise与raise...from之间有何区别?
  • 在python中可以用什么关键字来声明一个类_python里的raise是什么意思
  • Windows系统:开始--运行--命令大全
  • 微博热搜神器
  • python爬取微博热搜神器,微博历史数据

Git fatal unable to auto-detect email address相关推荐

  1. Git ----fatal: unable to access ‘https://gitee.com/***.git/‘: SSL certificate problem: unable

    fatal: unable to access 'https://gitee.com/gzllkm/GZL.git/': SSL certificate problem: unable to get ...

  2. git fatal: unable to access '/': schannel: next InitializeSecurityContext error (0x80092013)

    使用git时出现如下错误提示: fatal: unable to access '/': schannel: next InitializeSecurityContext failed: Unknow ...

  3. Git ----fatal: unable to access xxx: SSL certificate problem: self signed certificate in certificate

    fatal: unable to access 'http://gitee.com/yhhyu2015/CommonUtils.git/': SSL certificate problem: self ...

  4. git fatal: unable to access  Failed to connect to localhost port 1080: Connection refused

    git 拉取.更新子模块失败,提示失败 Submodule 'libXesBase' (https://git.xxxxx.com/xesoa/libXesBase.git) registered f ...

  5. GIT fatal: unable to auto-detect email address (got 'Administrator@DESKTOP-880G72L.(none)')

    https://blog.csdn.net/u010098331/article/details/53493639

  6. git commit 命令出现“fatal: unable to auto-detect email address (got '******@.(none)')错误

    初学者使用git来控制代码版本时,使用git commit 命令是出现fatal: unable to auto-detect email address (got '-@-(none)') 错误,这 ...

  7. git commit时出现unable to auto-detect email address错误

    我的小站.Github 问题描述: 在git commit的时候出现如下报错 *** Please tell me who you are. Run git config --global user. ...

  8. fatal unable to auto-detect email address (got ‘...@...(none)‘)

    fatal: unable to auto-detect email address (got '-@-(none)') 一.错误: *** Please tell me who you are. R ...

  9. fatal: unable to auto-detect email address (got ‘tim@newton.(none)‘)

    当用到:git commit -m "我的第一个代码" 遇到问题:fatal: unable to auto-detect email address (got 'tim@newt ...

最新文章

  1. python【蓝桥杯vip练习题库】ALGO-91 Anagrams问题
  2. 图˙谱˙马尔可夫过程˙聚类结构----by林达华
  3. Springboot+Maven在IDEA中配置好Maven后执行Reimport时提示:com.google.inject.internal.Errors.throwCreationExceptio
  4. 用JavaScript做301转向
  5. .net core ef mysql 的使用
  6. figma下载_如何在Figma中创建逼真的3D对象
  7. 异常检测机器学习_使用机器学习检测异常
  8. EJB+JSF开发示例(附源码)
  9. 面试题10:斐波那契数列
  10. 2-7 StatusStrip 控件
  11. 如何修改ns服务器,Godaddy如何修改NS信息
  12. 电脑键盘及excel快捷键
  13. 2010年网页游戏全年数据统计
  14. 电机控制进阶——PID速度控制
  15. NOJ 1116 哈罗哈的大披萨 【淡蓝】 [状压dp+各种优化]
  16. Axure交互-鼠标移入移除显示与隐藏
  17. 肖博高考数学二轮复习方法概率
  18. 使用windows默认工具快速修改图片尺寸
  19. java人力资源管理系统工作职责_JavaWeb课设——人力资源管理系统
  20. linux echo服务,在Linux中禁用echo服务

热门文章

  1. 视频播放到一半就无法播放怎么修复?
  2. 林辉高考机器人_“高考机器人”虽败犹荣 国产AI未来迈向何方?
  3. 看雪论坛 android,[分享] KSMA -- Android 通用 Root 技术
  4. 益聚星荣:靴子过万、口罩上千,加拿大鹅又是在收割“智商税”
  5. 怎么用生活照制作一寸证件照片
  6. OSChina 周二乱弹 —— 明天你是否会想起
  7. 春节红包活动如何应对10亿级流量?
  8. start-all.sh启动设置ssh免密登陆还总是提示输入密码的解决办法
  9. Linux U盘分区格式化 fdisk命令
  10. Python云端开发基础