Gitkraken bitbucket token invalid - linux

I am using gitkraken on linux and it is excellent application. When I authenticate with bibucket, app will connect.
But when I try to make push, app will display error in top panel:
Your oAuth token for 'Bitbucket' is invalid. Would you like to refresh
your oAuth credentials or try again without oAuth?
When I will select "Refresh Token" option I have to reconnect to bitbucket with the same result
"Retry without oAuth" option not connect (without error message), althought on bitbucket.org same login/pass work.
Originly I used another bitbucket account and that works, but with new one I cannot manage it.
Do someone has similar experience? Did you solve it?

I managed to solve it by deleting the remote and adding it again.

I tried a couple of things and it worked for me:
close git graken
opened powershell / cmd and navigate to the repo
git pull
open git kraken
go into the preferences (the little burger on the top right)
integrations, re-enter the token from gitlab or whichever tool you might be using
Alternately, I also tried closing the repo in git kraken and opening it from the main page also. it works for me now.

I had the same problem and I deleted and recloned my repo and it worked.

I used "GitHub Desktop". It showed the conflicts and once i fix them, i run GitKraken and the top panel asking for "oauth" disappeared.

Related

Log in to Github via Fedora Server 37

I am using Mac OS as my main operating system. I installed fedora 37 server edition in a VMware workstation as part of my course in college. I am trying to customize my prompt using this repo https://github.com/andresgongora/synth-shell.
I have installed git already. I also have power line-fonts installed. The issue I am having comes with this command: git clone --recursive https://github.com/andresgongora/synth-shell.git
When typed and executed I get a prompt asking me for a GitHub username and password. I enter my credentials and I get an error stating "Authentication Failed for https://github.com/andresgongora/synth-shell.git" even though my credentials are correct.
I have tried putting my username and password (both combinations separately) and I get an event error. I configured a global username and that doesn't work either.
Am I supposed to log in to my GitHub before cloning this repo? Does anyone else experience this or have a workaround?
I have tried putting my username and password (both combinations separately) and I get an event error. I configured a global git username and that doesn't work either.
Sites used:
Can't clone a github repo on Linux via HTTPS
https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git
https://documentation.red-gate.com/soco/troubleshooting/authentication-failed-when-cloning-from-github
Edit: I have also tried setting up a token to log in with. The only issue I am having is my linux distro does not support copy and paste so I am having to type everything out. When the password prompt comes up everything is blank to hide your password so I can't even check for spelling errors.
As of mid 2021, github the company is now enforcing git HTTPS authentication to use an access token rather than username+password. See this stackoverflow answer for full information.
One way forward is to generate an SSH key, and upload the public portion to github.
It warrants mentioning that this change is specific to Github Inc., the Microsoft subsidiary. There have not been any changes to git, the distributed version control system. Other, similar repository hosting services may not necessarily bar you from authenticating via username+password. Gitlab is one example.
I managed to fix my issue by using cockpit in my web browser. Doing this allowed my to copy and paste my information and everything worked first try.
Beginner problem.

Git push asks username & password for HTTP repo origin

I am working on a project of mine and I got the codes uploaded in github. I started working in this project from Win10 os and currently I'm working in Arch linux. In windows it didn't use to ask me for any password but it does now.
I've never pushed from my linux before. Today when I tried to push the terminal and VB code both are asking for my github username and password.
I kept a backup of this project at my usb hard drive and currently I pasted it in my linux ssd. What I'm saying is I didn't clone it from the repo. As far as my global username & user email are concerned both are accurate. I'm not using any SSH so when I type git remote -v in my terminal it shows https link as the origin for both fetch and push.
Why is it asking for my username and password? Is it secure to provide my password? In case if I provide my credentials then do I have to provide it every time I push? How to fix this?
I have searched stackoverflow for solution but the other questions that I have found doesn't match my criteria cause in windows it was working fine without asking any credentials.
So, I have updated my origin remote from https to ssh and added a ssh public key to my github account after creating one which is well defined by github finally my problem solved and now I can push to my repo without any credential prompt by the terminal. Thank you Code-Apprentice.
While in general, providing a username and password to git is secure, GitHub no longer allows authentication with username and password. Instead, you need to either use ssh or generate a personal access token.
See source for details.
Why people are editing my posts I don't understand. I'm trying to post a solution of the problem that I have faced previously. Then why people are editing my posts? I just want to put a proper solution for the future so that people get benefited from this. However, the solution of the problem is you have to do ssh push then it won't prompt for username & password anymore. That's all. Now please do not edit my post. I am not even sure how you are allowed to do that!

Intellij Android Studio opens localhost page to login on github

I am using android studio version 4.2 beta 3 and while I am using the GUI to push/fetch the studio prompts to login on github while I have already set an account.
The strange this is that I can use git on terminal but not on GUI.
I select the first option and my browser navigates me to a website that says to authorize in Github, I press the button, login on Github and then I get the following localhost page which needs some unknown credentials.
Do you have any ideas on how to fix this issue?
Thanks
This actually turns out to be an Android Studio bug.
See e.g. this and this reports
In the corresponding IntelliJ IDEA version it is working fine.
Log in using a token instead, as a workaround.
Unfortunately the issue still persists in android studios latest release but your workaround of Token works.
you have to Generate a new SSH key and adding it to the ssh-agent ,
you can find it there
My Github account is using the Single Sign-On from my organisation, so what worked for me was to go into Github settings -> SSH and GPG keys and then clicked on the button Configure SSO on my SSH key. Then click on "Authorize" for your organization.
Here's more details on how to do it https://docs.github.com/en/enterprise-cloud#latest/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on
This works when you get the following error while checking your project out
Clone failed
ERROR: The `----' organization has enabled or enforced SAML SSO. To access
this repository, you must use the HTTPS remote with a personal access token
or SSH with an SSH key and passphrase
that has been authorized for this organization. Visit
https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/ for more information.
Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Can't switch GitLab accounts for command-line Git

This might be flagged as a duplicate, I've tried all the fixes in the similar questions that popped up on the search, but none worked.
Basically, I was using my company's GitLab account to do my pushing, but decided to switch to my personal account for some reasons. Except I can't find a way to do that.
The ~/.git-credentials file doesn't exist, when I try to open it nano just gives me a new file. The ~/.git-config file already contains my personal account's email and username (but no password), and my commits on the repository page on GitLab are attributed to my personal account. However, Git never asked for the password (so I doubt it's actually logged in). Also, the contributions aren't showing up on my personal Overview page (the little colorful calendar thingy), instead they are showing up on the previous account's Overview page.
I also tried these two (separately):
git config --global --unset credential.helper
git credential-cache exit
No changes whatsoever. Still letting me push without asking for credentials, and commits still showing up on the wrong account's Overview.
I checked out the git-credential-store documentation as well (as suggested in a similar question), and for whatever it's worth, $XDG_CONFIG_HOME is empty and $HOME/.config/git/ doesn't exist either.
Someone else suggested going to Access Tokens on the GitLab website and deleting the corresponding token there, but it says "This user has no active access tokens."
I even tried ye olde uninstalling and reinstalling Git and it changed absolutely nothing.
I'm at my wits' end. Any idea where these darned credentials might be stored, or a way to force logout?
EDIT: A coworker partially fixed it for me. I had both accounts authenticated via SSH, and GitLab was only using the one I connected first, which was the corporate account.
I deleted both SSH keys, generated a new pair and this time authenticated only my personal account. It's working now. I wanted a way that I could switch between accounts (I have to use both) without having to re-authenticate via SSH every time, and if anyone still has an idea, I'm open to it.
The repos are cloned via SSH. Which is strange, because even then, the first time I pushed, it asked me for username and password. Only that time and then never again.
That looks like HTTPS URLs though. Check that with a git remote -v inside the repository.
Any credential helper setting that you would manipulate would only influence HTTPS URLS.
It is is SSH, then you would need to change those URLS to use an ~/.ssh/config entry
Host <HostEntry>
Hostname xxxx.xx.xx
User ubuntu
IdentityFile ~/.ssh/my_second_key.pem
With the new URL being:
ssh <HostEntry>

Deploying Node.js using Azure CLI and Git

I am trying to get my head around Node.js and using it for building bots. There's a long convoluted reason why I need to do this, the TLDR version is I need it for university.
Anyway, I have found a book online, it's called "Building Bots with Node.js" by Packt publishing. I am working through the book, and I have got to a section where I am supposed to Deploy my app to azure. The book says to do the following, in order:
Create a site with azure site create --git (sitename)
Run git add .
Run git commit -m "TwilioNodeBot first commit
Run git push azure master
Now, steps 1-3 worked fine. But when I get to step 4, I get a Windows pop-up asking me to enter credentials for my site. I have tried everything I can think of, but no matter what I enter I get the following error:
fatal: Authentication failed for 'https://username#sitename.scm.azurewebsites.net/sitename.git/'
Now, the thing is, it says the following in the book:
"After you type these commands, if you've never set up git/FTP deployment credentials for your Azure subscription, you'll also be prompted to create them. You can also enter these credentials on the Azure Portal."
I was never asked to create credentials. I did a bit of web searching and found out how to go into my portal and view my publishing profile, and get the username/password out of there. But when I do enter this information it doesn't work. I even tried resetting my credentials, but this didn't work either.
There's no information in the book about what to do here, and I cannot contact the author as there is no contact info.
Any ideas? What am I supposed to use for my publishing credentials?
OK, I figured it out. I had to open my "config" file in the ".git" folder and update the username at the start of the url.

Resources