Thảo M. Hoàng
Thảo M. Hoàng

Reputation: 1424

Unable to pull from remote server

I executed a git pull command. But had this issue.

$ git pull
fatal: unable to access 'https://git.my_repository.com.vn/fsoft/meta-packages.git': The requested URL returned error: 403

It seemed that http protocol had problem. I already check the connection - it's ok.

Who knows where this issue come from ?

Upvotes: 2

Views: 822

Answers (3)

Thảo M. Hoàng
Thảo M. Hoàng

Reputation: 1424

I have static routing on my network

sudo route add -net 192.168.5.0/24 gw 10.88.124.165 dev eth0

Enter below command on both my PC 192.168.5.1 and Gateway PC 10.88.124.165 above.

git config --global http.proxy ""
git config --global http.sslVerify "false"

Everything is okay now.

Upvotes: 3

developer_hatch
developer_hatch

Reputation: 16214

Could be for the git version, 1.7.10 has some issues with https connections. Then check if you have the rometes configured:

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)

Then you can do git pull

source https://help.github.com/articles/https-cloning-errors/

Upvotes: 0

Hugo
Hugo

Reputation: 637

This error is likely due to you not having the correct permissions or being authorized correctly on the remote server.

403 FORBIDDEN

The server understood the request but refuses to authorize it.

A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any).

If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials. However, a request might be forbidden for reasons unrelated to the credentials.

Source: HTTP Status Codes

Are you sure you are authorized and have the correct permissions to access the remote repo?

Upvotes: 0

Related Questions