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 2024-11-14 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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot