When I try to push/pull with Gitkrakent to/from Heroku, GitKraken tells me :
"Please log in to continue"
What is the requested "user/login" ?
(The one from my personal Heroku account doesn't work").
Thanks a lot !
Your username is the email you used to login on heroku.
The password is your auth token. You can get this by running these in console:
heroku login To login
heroku auth:token To get your password for GitKraken
To use Heroku git (something like https://git.heroku.com/reponame.git) with GitKraken, please use email as username, and use authorization token as password.
I create a long-term password to use with GitKraken by
Go to Heroku UI then login
Account Settings
Applications
Authorization / Create
authorization (don't set expire if you want long-term access)
Pointing remote to ssh protocol solved this for me.
https://git.heroku.com/{your-app}.git => git#heroku.com:{your-app}.git
Make sure you have same updated ssh keys in your account settings in Heroku related to that repository.
You may use ssh-agent to handle many keys
Related
So, this is what happens even if I entered correct Github UserName (or ID) and Password.
I have tried it with, name, UserName, Email ID but it all fails.
How can I get through this authentication step? plz help!!
entered correct Github UserName (or ID) and Password.
That the point of the error message. GitHub no longer accept passwords (since Aug. 2021), only PAT (Personal Access Token)
If you enter your token as a password, it would work.
you can also check your git config --global credential.helper is set to manager the Microsoft cross-platform GCM (Git Credential Manager)).
That way, you will cache said credentials (username+token), and won't have to enter them again.
I tried to login on heroku, but I was required to enter code generated by authenticator app, but I have no the authenticator app. I tried heroku login -i, but it says
"Error: Your account has MFA enabled; API requests using basic authentication with email
› and password are not supported. Please generate an authorization token for API access."
How can I solve this problem?
Thanks in advance.
You must enable Multi-Factor Authentication and set up your preferred MFA option.
One of the options is to install Google Authenticator and configure it to access Heroku: after login (on the browser) you need to provide the code displayed in the Google Authentication application.
Login via Command Line
The approach is still the same but you need to use the API Key as the password
% heroku login -i
heroku: Enter your login credentials.
Email [my email address]:
Password: ************************************. # enter API Key here.
Logged in as [my email address]
To create the API Token go to Heroku Dashboard -> Account
I’ve been trying to login to HEROKU CLI on a headless Ubuntu. So, I don’t have a chance to open a browser. That’s why, I need to login with credential or any other method but there are only two login options which are browser, credentials.
Is there anybody face with the same problem?
Command:
heroku login -i
Error Message:
› Error: Your account has MFA enabled; API requests using basic authentication with email and password are not supported. Please generate an authorization token
› for API access.
›
› Error ID: mfa_required
PS: The Heroku doesn’t allow me to disable MFA.
Shanshan Chen is basically right, but given the specifics of your issue you're still going to need the -i flag. I have had the same issue and was able to log in successfully using these steps:
Run heroku login -i
Enter your email address as normally
For the password, use your Heroku account API Key (see below)
Try heroku login and use API key as the password. Feel free to refer to
Not able login to Heroku account from command line
I am trying to access the Github repo which sits behind an enterprise firewall (Open VPN). I am trying to access with my username and password but getting the below Exception. Any suggestions on how to access the repo with Spring Cloud.
application.properties:
spring.cloud.config.server.git.uri=https://github.com/company-repo/abc.git
spring.cloud.config.server.git.username=tarun
spring.cloud.config.server.git.password=xxxxx
spring.cloud.config.server.git.ignore-local-ssh-settings=true
Exception:
Error occured cloning to base directory. org.eclipse.jgit.api.errors.TransportException:
https://github.com/company-repo/abc.git: not authorized
Do not Use Your GitHub password in your app.prop file...You will get a Not Authorized exception. Instead Generate an access token.
Creating a personal access token
You should create a personal access token to use in place of a password with the command line or with the API.
Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the GitHub API or the command line.
If you want to use a PAT to access resources owned by an organization that uses SAML SSO, you must authorize the PAT. For more information, see "About authentication with SAML single sign-on" and "Authorizing a personal access token for use with SAML single sign-on."
As a security precaution, GitHub automatically removes personal access tokens that haven't been used in a year.
Creating a token
Verify your email address, if it hasn't been verified yet.
In the upper-right corner of any page, click your profile photo, then click Settings.
Settings icon in the user bar
In the left sidebar, click Developer settings.
In the left sidebar, click Personal access tokens.
Click Generate new token.
Give your token a descriptive name.
Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo.
Click Generate token.
Click to copy the token to your clipboard. For security reasons, after you navigate off the page, you will not be able to see the token again.
Warning: Treat your tokens like passwords and keep them secret. When working with the API, use tokens as environment variables instead of hardcoding them into your programs.
To use your token to authenticate to an organization that uses SAML SSO, authorize the token for use with a SAML single-sign-on organization.
Using a token on the command line
Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS.
For example, on the command line you would enter the following:
$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token
Personal access tokens can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to switch the remote from SSH to HTTPS.
If you are not prompted for your username and password, your credentials may be cached on your computer. You can update your credentials in the Keychain to replace your old password with the token.
The way i made it work is :
Generate the Access Token on Github repo and provide read and admin rights to it
Use the Token as password
Credentials can be saved in Kubernetes as Secrets or inside Vault. Hope this helps.
Trying to figure out how to force command-line git to use Github token. If I clone repository with user name and token like git clone https://<user>:<mytoken>#git.web.com/organization/repositorythen everything works fine.
When I try to clone without the user name or token then the operation fails with an error:
remote: Password authentication is not available for Git Operations.
remote: You must use a personal access token or SSH key.
I would like to store that token somewhere so that I would not have to give it to git every time. Where should I store the token?
I tried to add token variable to a [user] section in .gitconfig file but it did not work.
Tried unsetting and setting (wincred) credential helper but that did not work either.
You should enable a credential manager, such as wincred, and then when Git prompts you for the username and password, enter the username and your token as the password. Git will then tell the credential helper to save the password in the system credential store, and future operations to the same server will reuse those credentials.
This is much more secure than using the token in the URL, because the system credential store is encrypted, whereas the file containing the URL is not.
It may be the case that you already have invalid credentials saved for that remote which are causing the failure; if so, see this answer for instructions on how to remove them so Git prompts you again, and then follow the steps above.