Github credentials not working on Sourcetree - github

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.

Related

Git Not Allowing to push changes to remote Repo

I have been facing the following error everytime I try to push changes to a remote repository:
"ERROR: Write access to repository not granted.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists. "
I have the SSH keys already set I am able also to git pull and git clone with no problems, the issue is just when I try to push changes.
Do you have any idea about ow to solve it ??
I am using a MacOs .
Thank you in advance for your time.
I removed the SSH keys from github account also I generated them again on my machine and added them again in my github account, but no luck so far.

TortoiseSVN Commit is forbidden by github [duplicate]

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

I'm using SourceTree with GitHub. GitHub made me "upgrade" to PAT access. But I can't find the place in SourceTree to copy this PAT

I'm using SourceTree with GitHub. GitHub made me "upgrade" security to use Personal Access Token rather password. But I can't find the place in SourceTree to copy this PAT. Meanwhile I'm looked out of my account

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.

Github for Windows Pull Request for remote Bitbucket Repo

Based on this tutorial I was able to successfully connect Github for Desktop with my remote Bitbucket repo.
Looking at the example tutorial repo I see there is an Pull Request option built in the application - great:
However the option is missing when I chose my remote Bitbucket repo:
I couldn't find any option that is reponsible for this.
Anyone knows what affects this behavior?
"Pull Request" is very much a GitHub feature, associated to GitHub repos.
So For BitBucket, the simplest approach is to push your feature branch to the remote repo (which is a BitBucket one, not a GitHub one), and make your PR from there (from the remote BitBucket web GUI, even within the same repo)
Once the PR is initiated, each push done from the GitHub Desktop will complete said PR.
In Bitbucket go to Settings -> Branch Permissions, and add a new branch permission with your name.
EDIT
https://stackoverflow.com/a/37343356/1544886