This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-08-20. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Article version: Enterprise Server 2.18

HTTPS cloning errors

There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don't have access to the repository.

In this article

Here's an example of an HTTPS error you might receive:

> error: The requested URL returned error: 401 while accessing
> https://hostname/user/repo.git/info/refs?service=git-receive-pack
> fatal: HTTP request failed
> Error: The requested URL returned error: 403 while accessing
> https://hostname/user/repo.git/info/refs
> fatal: HTTP request failed
> Error: https://hostname/user/repo.git/info/refs not found: did you run git
> update-server-info on the server?

Check your Git version

There's no minimum Git version necessary to interact with GitHub Enterprise, but we've found version 1.7.10 to be a comfortable stable version that's available on many platforms. You can always download the latest version on the Git website.

Ensure the remote is correct

The repository you're trying to fetch must exist on your GitHub Enterprise Server instance, and the URL is case-sensitive.

You can find the URL of the local repository by opening the command line and typing git remote -v:

$ git remote -v
# View existing remotes
> origin  https://github.com/github/reactivecocoa.git (fetch)
> origin  https://github.com/github/reactivecocoa.git (push)

$ git remote set-url origin https://github.com/github/ReactiveCocoa.git
# Change the 'origin' remote's URL

$ git remote -v
# Verify new remote URL
> origin  https://github.com/github/ReactiveCocoa.git (fetch)
> origin  https://github.com/github/ReactiveCocoa.git (push)

Alternatively, you can change the URL through our GitHub Desktop application.

Provide an access token

To access GitHub, you must authenticate with a personal access token instead of your password. For more information, see "Creating a personal access token."

Check your permissions

When prompted for a username and password, make sure you use an account that has access to the repository.

Tip: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on credential caching.

Use SSH instead

If you've previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see "Which remote URL should I use?"

Ask a human

Can't find what you're looking for?

Contact us