万隆的笔记 万隆的笔记
博文索引
笔试面试
  • 在线学站

    • 菜鸟教程 (opens new window)
    • 入门教程 (opens new window)
    • Coursera (opens new window)
  • 在线文档

    • w3school (opens new window)
    • Bootstrap (opens new window)
    • Vue (opens new window)
    • 阿里开发者藏经阁 (opens new window)
  • 在线工具

    • tool 工具集 (opens new window)
    • bejson 工具集 (opens new window)
    • 文档转换 (opens new window)
  • 更多在线资源
  • Changlog
  • Aboutme
GitHub (opens new window)
博文索引
笔试面试
  • 在线学站

    • 菜鸟教程 (opens new window)
    • 入门教程 (opens new window)
    • Coursera (opens new window)
  • 在线文档

    • w3school (opens new window)
    • Bootstrap (opens new window)
    • Vue (opens new window)
    • 阿里开发者藏经阁 (opens new window)
  • 在线工具

    • tool 工具集 (opens new window)
    • bejson 工具集 (opens new window)
    • 文档转换 (opens new window)
  • 更多在线资源
  • Changlog
  • Aboutme
GitHub (opens new window)
  • Git

  • Issue

    • sourcetree - error:insufficient permission for adding an object to repository database .git/objects
    • fatal:could not read Username for 'https://git.dev.tencent.com' 解决方法
      • 方法一:修改remote地址
      • 方法二:配置SSH
  • Git
  • Issue
2022-03-25
目录

fatal:could not read Username for 'https://git.dev.tencent.com' 解决方法

# fatal: could not read Username for 'https://git.dev.tencent.com' 解决方法

在使用Jenkins部署博客项目的时候,出现了 :fatal: could not read Username for 'https://github.com': No such device or address 的提示:

git-issue-002

说明一下该Jenkins工程是在服务器上的本地仓库,通过https协议拉取项目代码,解决办法如下:

# 方法一:修改remote地址

  1. git remote add origin https://{username}:{password}@github.com/{username}/project.git

  2. 直接修改 .git/config 隐藏文件,将 url 配置 修改为上诉格式即可。

    git-issue-002-1

# 方法二:配置SSH

注意:实际生产不建议使用方式一:

  • 不安全:暴露了账号密码
  • 不稳定:容易出现403、Time Out等情况,因为GitHub也不推荐这种方式,后续可能会被GitHub不支持。

生产上还是应该使用Git配置SSH。

上次更新: 5/30/2023, 10:03:37 PM
最近更新
01
2025
01-15
02
Elasticsearch面试题
07-17
03
Elasticsearch进阶
07-16
更多文章>
Theme by Vdoing
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式