Help Center/ CodeArts Repo/ FAQs/ Uploading and Downloading Code/ Error "The requested URL returned error: 401" Is Reported When HTTPS Is Used to Clone Code in CentOS
Updated on 2025-03-27 GMT+08:00
Error "The requested URL returned error: 401" Is Reported When HTTPS Is Used to Clone Code in CentOS
Symptom
Error The requested URL returned error: 401 is reported when HTTPS is used to clone code in CentOS.
Analysis
The built-in Git version of CentOS is 1.7.1 or earlier.
Solution
- Run the following command in Git Bash to check the Git version provided by the system: If the version is 1.7.1 or earlier, go to Step 2.
git --version
- Run the following command to uninstall the Git provided by CentOS:
yum remove git
- Download the latest version from the Git website and add Git to the environment variables.
- Download the Git source code package from GitHub. Replace the version number with the actual one.
wget https://github.com/git/git/archive/Version number.tar.gz
- Decompress the source code package.
tar zxvf Version number.tar.gz
- Switch to the Git source code directory containing the decompressed files.
cd git-Version number
- Generate the configuration file.
make configure
- Configure the Git installation path and code conversion library.
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
- Compile the Git source code and documents.
make all doc
- Install Git and its documents.
make install install-doc install-html
- Add the path of the Git executable file to the system environment variables.
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
- Apply the environment variables.
source /etc/bashrc
- Download the Git source code package from GitHub. Replace the version number with the actual one.
Parent topic: Uploading and Downloading Code
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.