Git:clone时报错403
首先命令行操作结果如下:
root@zhiren-PowerEdge-T110-II:/zrun# git clone https://git.coding.net/xxxxxxxx/xxxx.git
正克隆到 'anbu'...
remote: Coding.net Tips : [You have no permission to access this repo.]
fatal: unable to access 'https://git.coding.net/xxxxxxxx/xxxx.git/': The requested URL returned error: 403
起初完全不知道哪里出了问题。后来到处查阅,发现原因:git 客户端缓存了错误的密码。
问题起源:
https方式每次都要输入密码,按照如下设置即可输入一次就不用再手输入密码的困扰而且又享受https带来的极速
设置记住密码(默认15分钟):
git config --global credential.helper cache
如果想自己设置时间,可以这样做:
git config credential.helper 'cache --timeout=3600'
这样就设置一个小时之后失效
长期存储密码:
git config --global credential.helper store
增加远程地址的时候带上密码也是可以的。(推荐)
http://yourname:password@git.oschina.net/name/project.git真是后悔,图一时痛快,忽略了宝贵的“推荐”二字。
git config --global credential.helper store该命令可以将用户名和密码长期全局地长期地存储在客户端(实际是客户端所在电脑,并非git的任何目录下,也就是说,即使重装git,改密码也存在。),注意是全局地。 原作者不推荐的原因正是这个。因为,这里保存的账号和密码会自动应用到每一个git clone指令,如果想要克隆的不是该账号下的项目,就只会得到403错误。下路给出正解: 方法一:
增加远程地址的时候带上密码也是可以的。(推荐)
http://yourname:password@git.oschina.net/name/project.git 这种方式会把改账号和密码也添加到~/.git-credentials。 方法二: 运行命令:rm ~/.git-credentials,删掉git config --global credential.helper store保存的账号和密码。回到每次输入用户名和密码。
~/.git-credentials
Git:clone时报错403相关推荐
- git clone时报错 Empty reply from server
使用git clone 时报错: wujc@wujc-VirtualBox:~/Desktop/rk3288$ sudo git clone https://github.com/FireflyTea ...
- Git Clone时报错解决方法
环境说明:远程仓库为gitlab,redhat系统 错误提示如下 Cloning into 'codis'...remote: Enumerating objects: 16625, done.err ...
- (自己测试没有问题)解决git clone时报错:The requested URL returned error: 401 Unauthorized while accessing
版本问题,最直接的解决办法就是重新编辑安装git吧: 1. 下载:# wget -O git.zip https://github.com/git/git/archive/v2.3.0.zip 2. ...
- linux防火墙401,解决git clone时报错:The requested URL returned error: 401 Unauthorized while accessing...
版本问题,最直接的解决办法就是重新编辑安装git吧: 设置用户名和email git config --global user.name "zhucaixiang" git con ...
- git clone报错:repository ‘xxxxxxxxx’does not exist
git clone时报错: [root@test01 test]git clone root@192.168.1.38/home/git/solo.git fatal: repository 'roo ...
- git clone报错:Permission denied (publickey). fatal: Could not read from remote repository...
原文:git clone报错:Permission denied (publickey). fatal: Could not read from remote repository- 今天clone一 ...
- 【git clone 报错】fatal: unable to access ‘https://github.com/zimeng303/React.git/‘: Failed to connect
[git clone 报错]fatal: unable to access 'https://github.com/zimeng303/React.git/': Failed to connect t ...
- Git pull时报错:commit your changes or stash them before you can merge. 的解决办法
Git pull时报错:commit your changes or stash them before you can merge. 的解决办法 今天在pull的时候,报错,信息如下: error: ...
- 【实习小tip】elementUI表格数值加减和实时计算、导出数据并解决手机号科学计数法格式问题、git clone报错:OpenSSL SSL_connect: SSL_ERROR_SYSCALL
element表格数值加减和实时计算 实现效果: 代码: <el-table :data="voListForm" border show-summary :summary- ...
最新文章
- 76项!海南省崖州湾种子实验室揭榜挂帅项目立项结果公示
- 基于ESP32的竞赛裁判系统功能调试-硬件修改建议
- 深入struts2.0(七)--ActionInvocation接口以及3DefaultActionInvocation类
- C#学习笔记(一)变量 常量 基本数据类型 其它
- linux centos7不能ssh免密登录自己的问题解决
- Echarts 自定义数据视图
- 什么是“ rpcsvchost”,以及为什么它在Mac上运行?
- python求和_Python程序查找特殊求和系列的解决方案
- 学生云课堂 0917
- 【Playable API】不用Animator如何播放动画?
- python控制ppt定时_python中使用requests实现自动回帖.ppt
- MySQL数据库导入SQL[ERR]Unknown collation: ‘utf8mb4_0900_ai_ci‘的解决办法
- Tensorflow函数映射:py_func和map_fn
- uoj#283. 直径拆除鸡(构造)
- DELPHI基础教程 第七章 剪贴板和动态数据交换
- WPF 启动屏幕键盘
- 3D次时代来临 如何玩转红蓝立体游戏
- 向量组/矩阵/秩的理解
- 中国地质大学英语语音学习笔记(四):英语连读——弱读、冠词连读方法(包括元音字母前添加an的原因)和词间辅音加元音的连读方法
- 为什么人人都是颜值控?
热门文章
- Win10系统,开机后提示Desktp不可用的故障解决方法。
- linux文件管理 - 系统文件属性
- hi模板文件报乱码问题
- pyhton 从web获取json数据 保存到本地然后再读取
- Python 如何在csv中定位非数字和字母的符号
- Eclipse用法与技巧——导入工程时报错(already exist in the workspace)
- Windows 10中安装.net framework提示已经安装
- Ubuntu执行脚本报错-bash: ./send.py: /usr/bin/python: bad interpreter: Permission denied
- Linux中的 real user, effective user, saved set user 三种用户ID
- 关于程序修改时(修改被调用的SQL时),注意关联性(也可以说是影响范围)。