Git is throwing error
"C:\Program Files (x86)\Git\bin\git.exe" push -u --recurse-submodules=check -
-progress "origin" refs/heads/dev_civaplugin:refs/heads/dev_civaplugin
remote: Password authentication is not available for Git operations.
remote: You must use a personal access token or SSH key.
remote: See https://github.build.ge.com/settings/tokens or
https://github.build.ge.com/settings/ssh
fatal: unable to access
'https://github.build.ge.com/108012572/NextGenUT.git/': The requested URL
returned error: 403
Done
Press Enter or Esc to close console...
I cloned remote repository successfully using git extention and able to create new branch also but when tried to push my changes its throwing above error.
I created public and private key using Tools> putty> generate or import key my pc don’t have > .SSH folder in user In git hub I created Personal access token also using Settings > Developer settings > Personal access tokens Not getting clear idea of what the issue is, any input is a great help
While SSH keys can be read-only or read-write enabled, or scoped to specific repositories, personal access tokens do have an edge in terms of their finer-grained permissions model in comparison. This is likely why GitHub recommends tokens over SSH keys.
ssh-keygen -t rsa
ssh-rsa
New SSH key
and paste the private that you've copied earlier, and create itssh-add <your-private-key>
(e.g., ssh-add id_rsa)
Note: By default, it will have your id_rsa
primary key only; so, you need to add your custom private key in it.
See your git remote show origin
— you have URL for the remote origin
as https://github.build.ge.com/108012572/NextGenUT.git/
. HTTP(S) protocol certainly doesn't use SSH keys, for SSH keys you have to change the URL to use ssh://
protocol. Or you have to pass your Github name in the HTTP(S) URL. So either
git remote set-url origin https://[email protected]/108012572/NextGenUT.git
to use Github token or
git remote set-url origin ssh://[email protected]/108012572/NextGenUT.git
to use SSH keys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With