Linux: How to Solve Git clone error

How to Solve Error: error: The requested URL returned error: 401 Unauthorized while accessing

Problem:

Error: error: The requested URL returned error: 401 Unauthorized while accessing
git version1.7.1

Solution 1: Assign a user
git clone https://github.com/org/project.git

change to
git clone https://[email protected]/org/project.git
or
git clone https://username:[email protected]/org/project.git

If it appears in push or pull, then you need to change the remote address
git remote set-url origin https://[email protected]/org/project.git

Solution 2: Remove validation
git config -global http.sslverify false

Solution 3: (recommended)
Upgrade git version ≥ 1.7.10

Solution 4:
Add ssh secret key

 

Similar Posts: