文章目录

  • 解决方法

在我们用 go mod tidy更新项目依赖包的时候,有可能会遇到这个问题,这个主要问题是git没有配置的问题。

解决方法

在控制台输入以下命令,这个主要是配置我们拉取依赖源是哪一个,添加相应的仓库源

vim ~/.gitconfig
[user]email = emailname = name
[url "git@github.com/:"]insteadOf = https://github.com/"

还有一种是将ssh替代成https的方式

git config --global --add url."git@github.com:".insteadOf "https://github.com/"

参考文档:
https://medium.com/easyread/today-i-learned-fix-go-get-private-repository-return-error-terminal-prompts-disabled-8c5549d89045
https://stackoverflow.com/questions/32232655/go-get-results-in-terminal-prompts-disabled-error-for-github-private-repo

go 拉取仓库依赖报错:fatal: could not read Username for ‘https://code.byted.org‘: terminal prompts disabled相关推荐

  1. git报错fatal: could not read Username for ‘https://git.xxx.cn‘: terminal prompts disabled Confirm

    export GIT_TERMINAL_PROMPT=1 # 报错是因为没登录,设置这个后,会提示登录

  2. Go get报错 fatal: could not read Username for ‘https://xxx‘: terminal prompts disabled【解决方案】

    原因:go get 默认使用https拉取源码,缺少ssh用户权限. 解决方案: 配置git config. 以GitHub为例: git config --global --add url.&quo ...

  3. git拉取GitLab工程报错Repository not found

    拉取项目显示错误信息 remote: Repository not found. fatal: repository 'http://192.168.1.13/xxx/xxx.git' not fou ...

  4. git 拉取远程分支报错(fatal: ''xxx is not a commit and a branch '' cannot be created from it)

    解决 git pull  然后 git checkout -b new_branch_name origin/release/x.x.x.x

  5. npm 安装依赖报错解决方法总结

    npm 安装依赖报错解决方法总结 参考文章: (1)npm 安装依赖报错解决方法总结 (2)https://www.cnblogs.com/ysxq/p/11658571.html (3)https: ...

  6. git拉取代码报错fatal Authentication failed for ‘httpxxxx.git‘‘解决方案

    git拉取代码报错fatal: Authentication failed for 'http:xxxx.git''解决方案 1.需求背景 最近由于自己的主机出问题了,所以换了一台主机,然后在换的主机 ...

  7. Git本地仓库提交代码到远程仓库出现报错:fatal: ‘origin‘ does not appear to be a git repository fatal: Could not read fr

    Git本地仓库提交代码到远程仓库出现报错:fatal: 'origin' does not appear to be a git repository fatal: Could not read fr ...

  8. 更新Composer依赖报错处理Fatal error: Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRe...

    更新Composer依赖报错处理 Fatal error: Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepos ...

  9. 更新Composer依赖报错处理Fatal error: Declarat…

    更新Composer依赖报错处理 Fatal error: Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRe po ...

最新文章

  1. 增值税发票OCR识别
  2. 【控制】《多智能体系统一致性与复杂网络同步控制》郭凌老师-目录
  3. 牛客网递归错题:递归、欧几里得求最大公约数的时间复杂度、线性递归与尾递归实例区别
  4. nginx+ssl+pm2 部署 nodejs 服务
  5. fputc会覆盖吗_墨粉寿命和打印的文件有关系吗?
  6. python使用GUI(图形用户界面)
  7. 树:二叉树的内存拷贝和内存释放
  8. hibernate文档
  9. icem合并面网格_详解Flunet Meshing:高级网格划分工具中的“扫地僧”
  10. idea黑暗护眼主题
  11. 计算机毕业设计JAVA‘大学生心理健康咨询管理系统mybatis+源码+调试部署+系统+数据库+lw
  12. 记账系统推荐金蝶精斗云_金蝶精斗云云进销存软件哪款比较好?
  13. 微软internet连接服务器,微软WEBS安装攻略之建立临时 Internet 连接
  14. kubuntu与ubuntu切换
  15. pyton3 with异常
  16. switch 注册哪个服务器,switch注册教程
  17. MySQL 语法整理(2)
  18. 安卓11:android studio出现:Executing tasks: [:app:assembleDebug] in project D:\Android studio\New start
  19. Activiti实现会签功能程序Demo
  20. Metal每日分享,自然饱和度滤镜效果

热门文章

  1. 【漫漫转码路】Day 39 C++ day10
  2. 育儿说: 每天给孩子吃牛肉, 坚持半年有什么效果? 医生说了大实话
  3. python实现批量修改图片颜色
  4. 电子报表数据稽核实践-VLOOKUP函数的妙用
  5. 将windows下文件编码格式转换成UTF-8 文件编码格式
  6. Arch linux uefi 启动盘,用UEFI安装ArchLinux 20140105
  7. buuctf 荷兰带宽数据泄露
  8. “项目负责人”及“分项目负责人”职责
  9. 深入探究Windows平台客户端安全问题-进程地址空间入侵和白加黑高阶利用
  10. 小时,速度,筒仓团队和甘特斯