TortoiseSVN Commit is forbidden by github [duplicate] - github

Over a long period of time I am using tortoise git, today I am not able to use the tortoise git and getting the below error.
git.exe pull --progress -v --no-rebase "origin" remote: Support for
password authentication was removed on August 13, 2021. Please use a
personal access token instead. remote: Please see
https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
for more information.
I am using the latest tortoise git version.
I understand what is the git latest change. But I want to use tortoise git. Someone, please help me out this issue.

Github Has Revoked the support for password authentication on 13 Aug 2021 and giving the below mentioned response:
Support for password authentication was removed on August 13, 2021
In order to fix the issue follow the below steps:
Goto settings of Github account
Find and Select Developer Settings
Find and Select Personal access tokens
Generate a new token
Fill in any note and select the access scopes
once done click on generate token
Use the generated token in place of a password to communicate with GitHub.

Use the following steps for avoid this issue.
At https://github.com/settings/tokens, go and generate a token.
While git clone, push, pull use the below credentials.
username: user_github_username
password: add_generated_token instead of the password.

Actually, the git wants to store the token in the local machine instead of a password.
So you can fix this issue on MAC
Click on the profile picture
Goto the settings
then click "Personal access token and generate new token" as shown in the picture
then write then token name + select expiration date and select the permissions that you want to give and then click on "Generate token present at the bottom of the screen"
open the keychain access and search the github and double tap the github account
final step is to paste the github token in the password field. That's all you have to do.

Follow the below steps to solve the issue.
Update your git version using git update-git-for-windows
In the windows start button, search Credential Manager and open.
Click the Windows Credential, search and delete the GitHub credential.
Now using tortoise git, pull the code. You will get the below popup.
Click Sign in with your browser in the popup and now you can use tortoise git as like earlier.

Just follow the simple three steps to push your repository in git...
before that you may run below command first
git init
git status
git add .
git branch -M main
git remote set-url origin git#github.com:<username>/<repository_name>.git
git commit -am "your comments"
git push --set-upstream origin main

Related

gitlab push is asking for github credentials?

I'm trying to push some files to a Gitlab project which I've already created in the GitLab GUI. So I'm trying to add some files to that project which already exists.
When I try:
git remote add origin https://git.doit.wisc.edu/my_user_name/my-website.git
I get this error:
error: remote origin already exists.
So I figured I could move on to the next step in the documentation - git branch.
Then I use:
git branch -M main
I was prompted with:
I entered my keychain password and all seemed fine but when I try to do:
git push -uf origin main
The terminal reads:
Username for 'https://github.com':
I put in my username and then get this error:
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
It seems like git is confusing gitlab and github. I'm trying to push to gitlab, not github. I'm so confused here. Is there something I'm missing in the first step?
No, Git's not confused here. When you said, git remote add origin… and Git reported an error, that means that the remote origin already exists for that repository. In this case, that remote points somewhere on GitHub, which you can see with git remote -v.
If you want to replace the existing URL for the origin remote, use git remote set-url origin https://git.doit.wisc.edu/my_user_name/my-website.git. If you want to create a new, differently named remote, then do git remote add gitlab https://git.doit.wisc.edu/my_user_name/my-website.git and push with git push gitlab main.
Note also that GitHub no longer allows you to use your account password to authenticate with Git. Instead, when prompted for a password, go to https://github.com/settings/tokens and create a token with the repo scope, and use that instead. However, in this case, since you're intending to push to GitLab, that shouldn't matter here.

Cannot clone private repo in which I am an admin even with SSH keys / OAUTH

I use GitKraken with OAUTH and work often with private repositories without issue. I was recently invited to a repo that is owned by an organization and is private. I am an admin on the repository. It appears forking is disabled but what is strange is when I try to clone it, I receive the following popup:
It also doesn't show up in my list of available repositories though the rest of my private repos do appear. Trying to figure out if there is some odd organizational permission I need to get fixed.
It is best to switch back (temporarily, for testing) to command-line and check what origin is:
cd /path/to/repo
git remote -v
Make sure it is an SSH GitHub URL (git#github.com:me/myRepo)
You can test its access (even without cloning it) with:
git ls-remote git#github.com:me/myRepo

Github credentials not working on Sourcetree

I used Sourcetree with Github as my remote repo base. I was able to connect and fetch the code from the Github repo but due to some issue has to restart the sourcetree. And now the credentials donot work. I tried the suggestions like setting the PAT and using it instead of password for GIT basic authentication. But it has not worked. If I do any FETCH or PULL, it asks for GITHUB credentials and when I use the Username/password i use to log into GIthub (it works in Github) but when i use same in Sourcetree to connect to github, it doesnt work. And I get this error - enter image description here
I can login into sourcetree with my bitbucket account but for some reason this fetches the commits that were done about an year ago on a different branch.
Any help/advice on what I could do to resolve this please.

Visual studio code will not let me push anything to my repository

I have created on online repository on github and the repository is set to private. I have some files that i wish to commit and push to this repository using visual studio code. I have successfully cloned the repository to my local device after making the repository public but as soon as I wish to commit any of my changes i get the following error
Git remote: permission denied to <My username>
I have tried entering the following command in the terminal. The username is the username of the person who created the repository.
git config --global user.name <github userID>
But the same error still persists. Like i said the user Id i enter created the repository and i am unsure why it is denying me access to the repository. Do i need to login on visual studio code with my github account and if so how do i do that.
The user.name setting has nothing to do with authentication, only with commit authorship.
Check first your git remote -v output in your local repository.
If it is an SSH URL, and if ssh -Tv git#github.com is working (meaning you have registered your public key on your GItHub account and you see "Hi username! You've successfully authenticated, but GitHub does not provide shell access."), that should work from VSCode too.
If it is an HTTPS URL, the first push from VSCode should trigger a popup, for you to enter your username/password.
Note: if you have 2FA activated, that would be your username/PAT (Personal Access Token)
That should then be cached by your credential helper (check git config --global credential.helper)

Can't find git repository on an enterprise github with token access?

I just started at a new company. This company has an enterprise github site at github.COMPANY.com. I'm on a Windows 10 box, logged into CentOS 7 server through putty, trying to start up a new branch of an existing repository.
They use token access to github (I have no prior experience), and I was able to setup my token, clone the necessary repository, make a test document, and commit it. But when I try to push back to the repo:
$ git push
remote: Repository not found.
fatal: repository 'https://x-access-token:TOKENNUMBER#github.COMPANY.com/innovation/REPO_NAME.git/' not found
The address in quotes is the same exact text as I used to clone the repository
$ git clone htpps://x-access-token:TOKENNUMBER#github.COMPANY.com/innovation/REPO_NAME.git/
So I know the address is valid since I successfully cloned. It appears that I can pull just fine, although there is nothing to pull right now.
$ git pull
Already up-to-date.
Anyone have any ideas about the error message? I was actually thinking that my user might not have permissions to push, which is causing the 'not found' error since my token is not recognized as valid.