The requested URL returned error: 401 Unauthorized while accessing
这个一般是旧版git的问题,需要安装新版的。CentOS 想下载最新版只能手动下载安装。

第一步:在手动安装之前,先要把 git 依赖的文件安装好
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

第二步:下载git安装包 https://mirrors.edge.kernel.org/pub/software/scm/git/

第三步: 解压并进入目录
tar -zxvf git-2.17.0.tar.gz
cd git-2.17.0

第四步: 编译生成configure文件(先看下是否有,没有才执行这步)
make configure

第五步:执行生成的configure命令并指定命令前缀
./configure --prefix=/usr/local

第六步:make all一下,注意指定前缀!!!
make prefix=/usr/local all

第七步:make install一下,注意指定前缀!!!
sudo make prefix=/usr/local install

其他:如果之前有旧版的git,可以执行下边的选项替换之
sudo rm /usr/bin/git
ln -s /usr/local/bin/git /usr/bin/git
最后这两步是删除旧的git,并把新的 git 建立新的软链接到 /usr/bin/git

CentOS 下 git 401 Unauthorized while accessing 问题解决的更多相关文章

  1. error: The requested URL returned error: 401 Unauthorized while accessing

    我遇到的其中一个问题. 问题描述: 在git push -u origin master是,提示“error: The requested URL returned error: 401 Unauth ...

  2. eclipse git 报 git: 401 Unauthorized

    使用 eclipse neon Git clone 项目时,eclipse 报 git: 401 Unauthorized, 经查阅,发现是 eclipse bug 造成的,解决办法如下 eclips ...

  3. mac和centos下git安装

    mac下面的git安装,这篇文章写的很详细了http://www.cnblogs.com/ccdev/archive/2012/09/12/2682098.html 谈谈centos下的安装.我用的是 ...

  4. 解决git clone时报错:The requested URL returned error: 401 Unauthorized while accessing

    版本问题,最直接的解决办法就是重新编辑安装git吧: 1. 下载:# wget -O git.zip https://github.com/git/git/archive/master.zip 2. ...

  5. centos 下git服务器搭建

    准备 CentOS Linux release 7.0.1406 (Core) ssh 22端口 http 80端口 本文主要是ssh协议支持,http协议配置后还有问题. 摘抄的一段说明 SSH 协 ...

  6. centos下升级git版本的操作记录

    在使用git pull.git push.git clone的时候,或者在使用jenkins发版的时候,可能会报类似如下的错误: error: The requested URL returned e ...

  7. 转:centos下升级git版本的操作记录

    https://www.cnblogs.com/kevingrace/p/8252517.html 在使用git pull.git push.git clone的时候,或者在使用jenkins发版的时 ...

  8. git clone出现的error: The requested URL returned error: 401 Unauthorized

    error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.. ...

  9. Centos下源码安装git

    1.centos下git版本太久了,才1.8几,而官方更新的还是很活跃的,于是我就想源码安装一个新版本. 2.首先到: https://github.com/git/git/releases 下载最新 ...

随机推荐

  1. 防止chrome主页被篡改并设置为默认打开无痕浏览方式

    1. 找到chrome的快捷方式, 右击打开属性 2. 将目标框内容改为以下内容chrome.exe的目录位置 // ----- 引号中的内容为"PATH\Chrome\Applicatio ...

  2. python 字典元素删减

  3. 【Flask源码分析——请求上下文与应用上下文】

    Flask中有两种上下文,请求上下文和应用上下文.两者的作用域都处于一个请求的局部中. 查看源代码,上下文类在flask.ctx模块中定义 AppContext类定义应用上下文,app是当前应用Web ...

  4. day1_python流程控制、For循环

    一.流程控制 条件语句 1.1.单分支 ? 1.2.多分支 ? 需求一.用户登陆验证 #!/usr/bin/env python name=input('请输入用户名字:') password=inp ...

  5. P3899 [湖南集训]谈笑风生 主席树

    #include<iostream> #include<string.h> #include<algorithm> #include<stdio.h> ...

  6. 2019-2-21-PowerShell-通过-WMI-获取设备厂商

    title author date CreateTime categories PowerShell 通过 WMI 获取设备厂商 lindexi 2019-2-21 20:2:45 +0800 201 ...

  7. Cisco 交换机笔记

    最近使用 Cisco L3(C3560X), L2(2960) 交换机搭建了 VLAN 环境,其中包括了 VLAN 的配置, VLAN 间的路由等,在此写篇笔记记录下. VLAN 结构 L3 Swit ...

  8. vue-router在新窗口打开页面

    1. <router-link>标签实现新窗口打开: <router-link target="_blank" :to="{path:'/app/dat ...

  9. Java1.8 获取文件总行数

    Files.lines(Paths.get("aaa.txt")).count();

  10. git卡在Resolving deltas 100%的解决办法

    很多同学都有这样的问题.不知道是git的问题,还是tortoisegit的问题. 我的版本: Git-1.8.4-preview20130916 TortoiseGit-1.8.6.0-32bit 已 ...