Here I can't able to push my file into GitHub. I shows error
The requested URL returned error: 403
and permission denied in terminal(Attached Image below).
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git add src/.
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git add public/.
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git commit -m "second Commit"
On branch main
nothing to commit, working tree clean
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git branch -M main
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote add origin https://github.com/kungumasakthivel/Dumy.git
error: remote origin already exists.
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote remove orgin
error: No such remote: 'orgin'
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote remove orgine
error: No such remote: 'orgine'
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote remove origin
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote add origin https://github.com/kungumasakthivel/Dumy.git
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git push -u origin main
remote: Permission to kungumasakthivel/Dumy.git denied to Agil1102.
fatal: unable to access 'https://github.com/kungumasakthivel/Dumy.git/': The requested URL returned error: 403
__
Top comments (4)
2.Choose the
Settings
menu option.3.Page will load, now select the very last item on the bottom left (< > Developer Settings)
4.New page will load (very odd looking really) -- we want to choose "Personal access tokens"
It is likely you'll have to expand that item to see the two items beneath it.
5.Now, we want to select Tokens(classic)
You'll see something like the following:
6.We want to generate a new token:
7.Let's select Generate New token (classic)
You'll probably have to type in your GitHub password at this point to prove you are really you.
Now you'll see a huge list of items (scrolls of the page) for what you want to allow the PAT (personal access token) to be able to do.
You can add a note (to remind you what it is for), an expiration date and for the ability to update your repo code you want it to be like the following:
8.Scroll all the way tot he bottom of the page and click the [Generate Token] button
When you do that it will display the "password" one time and never again.
Copy that password and put it somewhere where only you can get to it.
Now, when you attempt to push changes to GitHub you will use it like the following:
That's how its really done.
NOTE : Yes, I deleted the PAT from my account so that password will no longer work. ๐ค
Are you setup to push with ssh keys?
No I didn't use ssh key.
I don't think you can push to GitHub unless you are using SSH keys or using their CLI.
Try the GitHub CLI, as that might be able to solve your problem.