Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403

I'm getting HTTPS: 403 error while pushing to the repo:

Enumerating objects: 1007, done.
Delta compression using up to 8 threads
Compressing objects: 100% (264/264), done.
Writing objects: 100% (376/376), 139.79 KiB | 3.58 MiB/s, done.
Total 376 (delta 278), reused 151 (delta 101), pack-reused 0
error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

Git version:

$ git --version
git version 2.40.0

First, I was a collaborator to the project and this worked well about a month ago, but 1-2 weeks ago it stopped working, nobody touched the repo! Then I transferred this repo from user A to myself, I thought that permissions are broken, but I still can push to repositories created by myself with same tokens. So, credentials are correct 100%.

Also, an opened PR is associated with this repo, but I can neither push to the PR's branch nor create a new one, even though I'm an owner. What can cause this behavior and how to make it work?

P.S.: I didn't try to use ssh instead, this is, actually, not possible for me now, so I use https.

like image 805
k1r1t0 Avatar asked Oct 31 '25 10:10

k1r1t0


2 Answers

HTTP status 403 is "Unauthorized" - you've provided valid credentials and authenticated successfully, but the account you're using is not permitted to perform the action you've requested.

Unfortunately, there isn't enough information here to provide a concise diagnosis, but a few broad possibilities come to mind:

  1. You moved the repo to your own account on the host, but didn't update the remote on your own system. Check git remote -v; if the remote URL is incorrect, then you can fix it with git remote set-url $REMOTE_NAME $NEW_URL.
  2. You're using the correct URL, but you don't have write permissions to that repo.
  3. You're using the correct URL, and you have write permissions to that repo, but the branch you're attempting to push to is protected and you don't have permission to push directly to that branch.
  4. A proxy server is misconfigured.
like image 62
Jim Redmond Avatar answered Nov 02 '25 01:11

Jim Redmond


for me, the following process worked

https://github.com/rohit/xyz

to

https://github.com/rohit/xyz.git 
like image 40
Rohit Goyal Avatar answered Nov 02 '25 00:11

Rohit Goyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!