Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The requested URL returned error: 403 Forbidden #39

Closed
sunnytranco opened this issue Apr 19, 2017 · 78 comments
Closed

The requested URL returned error: 403 Forbidden #39

sunnytranco opened this issue Apr 19, 2017 · 78 comments

Comments

@sunnytranco
Copy link

When I finish step 3 of the wizard, this error shows up:

error: The requested URL returned error: 403 Forbidden while accessing https://sunnytranco:{password}@github.com/sunnytranco/gravLearn2.git/info/refs fatal: HTTP request failed

I've already tested my connection, it's fine

@w00fz
Copy link
Member

w00fz commented May 1, 2017

Make sure the password is actually correct, I know it sounds like a stupid advice but I did have this issue myself before 😃. Also, if you are using 2FA with GitHub, you cannot use the actual password from remote, you need to create an Access Token and use that instead of your password.

@YuriyKartuzov
Copy link

I'm having this issue on public repo, which was private before. This means there are no passwords to be entered

@w00fz
Copy link
Member

w00fz commented Aug 28, 2018

You do still a password even if it's public. The authentication is required in order to guarantee you have PUSH permissions.

@w00fz w00fz closed this as completed Aug 28, 2018
@YuriyKartuzov
Copy link

My bad, I got confused there, I was still required to enter credentials (ofcause)

@ghost
Copy link

ghost commented Mar 5, 2019

how can I create an access token

@paulhibbitts
Copy link
Collaborator

Hi @Amina-Zafar , it depends on the Git-based service you are using. For example, with GitHub you could create a token at https://github.com/settings/tokens

@ghost
Copy link

ghost commented Mar 5, 2019 via email

@ghost
Copy link

ghost commented Mar 11, 2019

unable to push my code into my current account, getting access denied 403 error. I have tried many options making new repos, by changing drive, even created repo on Bitbucket but still, my repo is associated with my colleague GitHub account. Please guide me how can I resolve this issue?

@paulhibbitts
Copy link
Collaborator

Did you follow these steps https://www.youtube.com/watch?v=avcGP0FAzB8 (interface slightly different now)? Are you getting any error messages?

@ghost
Copy link

ghost commented Mar 11, 2019 via email

@ghost
Copy link

ghost commented Mar 12, 2019

I have viewed this video but this is not my problem solution. Actually, my repo is public and my colleague repo is also public. The problem is, I am unable to push my code into my account repo this is the main problem that I am facing. Please help me.

@ghost
Copy link

ghost commented Mar 12, 2019

Moreover, when I push my code into GitHub then give the error, 'access denied from my colleague account', which is no more login on my laptop.

@paulhibbitts
Copy link
Collaborator

This sounds less like a GitSync Plugin issue and more of a Git/GitHub issue... sorry but I don't think I can be of any help with that.

@ghost
Copy link

ghost commented Mar 12, 2019 via email

@habibakij
Copy link

fatal: unable to access 'https://github.com/habibakij/Testing.git/': The requested URL returned error: 403
i face this problem.. username habibakij

@trilbymedia trilbymedia deleted a comment Jul 24, 2019
@trilbymedia trilbymedia deleted a comment Jul 24, 2019
@AndABond
Copy link

fatal: unable to access 'https://github.com/habibakij/Testing.git/': The requested URL returned error: 403
i face this problem.. username habibakij

Did you manage to fix this error, Facing the same thing

@KirilNit
Copy link

KirilNit commented Aug 2, 2019

Have the same issue with my repo. Who managed this or anyone who can help?

@w00fz
Copy link
Member

w00fz commented Aug 2, 2019

That error means you are using wrong credential or wrong repo:

  1. Username needs to be the user, not the email
  2. Ensure you provide the proper password. If you have 2FA enabled on GitHub, you need to make sure you create an Access Token with proper access permissions and use the token as password instead.
  3. Repo format is: https://github.com/<user>/<repo>.git

403 means GitHub is not granting you access so one or more of the 3 things above are the problem

@kirtanwadekar
Copy link

Can anyone please help me ASAP, with below-mentioned error on cmd terminal of vscode while the last step(git push -u origin master) to push my project.

D:\ReactJS Projects\resort>git push -u origin master
remote: Permission to kirtanwadekar/react-beach-resort-recording.git denied to kabir19.
fatal: unable to access 'https://github.com/kirtanwadekar/react-beach-resort-recording.git/': The requested URL returned error: 403

D:\ReactJS Projects\resort>

@w00fz
Copy link
Member

w00fz commented Aug 9, 2019

403 means credentials errors or that you don’t have permission to push.

@ysh329
Copy link

ysh329 commented Oct 6, 2019

same error

@Mi36
Copy link

Mi36 commented Oct 7, 2019

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

@rajunerugatti123
Copy link

$ git push origin master
remote: Permission to rajunerugatti123/secondrepo.git denied to nerugattiraju1234.
fatal: unable to access 'https://github.com/rajunerugatti123/secondrepo.git/': The requested URL returned error: 403
i will get this type of error. how it can solve

@orangefruity
Copy link

error: The requested URL returned error: 403 Forbidden while accessing https://github.com/orangefruity/test.git/info/refs

@kiranashav
Copy link

Hi People,

ILLYAS-DEULECT has already given us the answer. I was facing the same problem mentioned by rajunerugatti123, w00fz, Amina-Zafar . I followed the steps below and was able to resolve the issue

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

@bharathreddymuddarla
Copy link

I had the same issue and the solution provided by ILLYAS-DEULECT worked.

Thank you ILLYAS-DEULECT

@zhahong
Copy link

zhahong commented Jun 5, 2020

Hello,
I personnally solved this problem by doing the following on the command line
git remote set-url origin https://yourusername@github.com/user/repo.git
Best,

Actually, the exact way is git remote set-url origin +your repository URL, I resolved this issue by this way, also thanks

@TicketManagementSystemG3

Hi People,

ILLYAS-DEULECT has already given us the answer. I was facing the same problem mentioned by rajunerugatti123, w00fz, Amina-Zafar . I followed the steps below and was able to resolve the issue

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

how to resolve this issue in linux

@arverma
Copy link

arverma commented Jun 14, 2020

For macOS try this for https problem:
git config --global credential.helper osxkeychain

Then try pull, push and it should ask for username and password.

@bhargavshah
Copy link

For Mac

If you have the below setting
git config --global credential.helper osxkeychain

And your credentials are correct in the "Keychain Access" app.

Deleting all the Github internet passwords. Now when you try to push, Git will try to authenticate you again by asking for username/password, or take you to Github auth page.

@ckoorosh
Copy link

ckoorosh commented Jul 5, 2020

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

For those whose problem is not solved in this way...
I strongly recommend to check that you have the permission to push to the repo. To make sure, ask the repo's admin to give you the WRITE permission in the 'Manage Access' section of the repo's settings.
Hope this works for you.

@kizzanaome
Copy link

Hi People,

ILLYAS-DEULECT has already given us the answer. I was facing the same problem mentioned by rajunerugatti123, w00fz, Amina-Zafar . I followed the steps below and was able to resolve the issue

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

what about on Linux... every solution i see is mac or windows what about linux

@panthia
Copy link

panthia commented Jul 15, 2020

Working again. Thank you.

@HMadhuparna
Copy link

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

Thank you m-illyas this worked

@magedhelmy1
Copy link

I cloned a repo, did some edits, and tried to push to my own repo. This gave me the error

fatal: unable to access 'https://github.com/matterport/Mask_RCNN.git/': The requested URL returned error: 403

So I checked

1. git remote -v
2. git remote rm origin

Checked now that git remote -v is empty
Then added the correct URL

1. git remote add origin git@github.com:magedhelmy1/x.git
2. git push -u origin master

@AhmadTesting
Copy link

AhmadTesting commented Aug 13, 2020

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

Such a solid solution although it didn't work completely for my case I have been trying to push my data to a different account SO in order to solve that.

I had to add two more steps on this solution and it worked just fine.

git config --global user.name "new-name"
git config --global user.email "email for my second account"

and that got it to work for me... am not sure why it didn't work without changing the name and email though.

@hasibaziz37
Copy link

Please correct the path for windows:

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Correct:
Control panel > Credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

Thank you. Its working fine. Its really helpful. Great

@abhay0806
Copy link

May be, you clone someone else's repo and now you are trying to push that repo into your own account. You will not be able to do that.

@Hossanna
Copy link

In trying to push origin master...
Fatal: unable to access 'https://.../': Failed to connect to GitHub.com port 443: Bad access

Please how can I solve this problem

@Pushp1992
Copy link

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

@Pushp1992
Copy link

This was the savage reply. It worked well.

@ghost
Copy link

ghost commented Oct 21, 2020

help me fix this err:
remote: Permission to lqcuong021099/dog-cat-mouse.git denied to quoccuong021099.
fatal: unable to access 'https://github.com/lqcuong021099/dog-cat-mouse.git/': The requested URL returned error: 403

@w00fz
Copy link
Member

w00fz commented Oct 21, 2020

That error is bad credentials

@KaishM
Copy link

KaishM commented Nov 9, 2020

following @m-illyas steps solved my issue.

@pk0205
Copy link

pk0205 commented Jan 10, 2021

while creating personal access token make sure to select scopes.(just selecting repo should be fine)

@krishnaanji
Copy link

remove existing credentials in 'windows credentials'

@caprica-Six
Copy link

caprica-Six commented Feb 3, 2021

I was getting the same "403 error. Permission to write to gist denied", when trying to clone a gist repo with https.

Repo format is: https://github.com//.git

Here's how I fixed it:

  • Created Personal Access Token, as per docs.
  • Ticked - gist - Create gists.
  • Login - username, which is user, not email (as mentioned above)
  • Password - this is the Access token - paste

Now all is working fine. I am able to commit.

Screenshot 2021-02-03 at 09 45 24

@rigov1984
Copy link

El error puede ser que la computadora haya guardado un nombre de usuario y contraseña de git, por lo que si cambia a otra cuenta, aparecerá el error 403. A continuación se muestra la solución
para Windows, puede encontrar las claves aquí:

panel de control> cuentas de usuario> administrador de credenciales> credenciales de Windows> credenciales genéricas

A continuación, elimine las claves de Github.

En Mac
1-In Finder, busque la aplicación Keychain Access.
2 En Acceso a llaveros, busque github.com.
3-Busque la entrada "contraseña de Internet" para github.com.
4-Edite o elimine la entrada según corresponda.

efectivamente esta solución me sirvió....muchas graciassss.

@FreitDev
Copy link

Followed the steps from @LuisMauricioFalla and that worked for me.

@anar1501
Copy link

fatal: unable to access 'https://github.com/blablabla/Annotations.git/': The requested URL returned error: 403
So I tried it now and got an error like this. In my opinion, the reason for this error is indirectly because the other party does not allow the project.

@Rimpi246
Copy link

Hi People,

ILLYAS-DEULECT has already given us the answer. I was facing the same problem mentioned by rajunerugatti123, w00fz, Amina-Zafar . I followed the steps below and was able to resolve the issue

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

Hello...I did the same but the error still persists. What do I do ?

@0x0Eth
Copy link

0x0Eth commented May 11, 2021

The error may be, the computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac
1-In Finder, search for the Keychain Access app.
2In Keychain Access, search for github.com.
3-Find the "internet password" entry for github.com.
4-Edit or delete the entry accordingly.

Thank you. This solved my problem

@alhamidysattam
Copy link

help
:)

@MRRaihan
Copy link

Thank you. Its working fine. Its really helpful. Great

@trilbymedia trilbymedia locked and limited conversation to collaborators Jun 14, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests