When I try to follow the tutorial at Cloud Code Guide, it says to create a new app with parse and login. After entering my user name and password, it says "Authorization Failed." I'm 100% sure I'm using the correct email and password for GitHub. How can I use the command line tool if my account is linked with GitHub?
I'm using the latest version of the parse command line.
Log in to parse.com and go to your account page. Click the update button and set a password on your Parse account. It should allow you to set one without asking for a 'current' password if you signed up via GitHub. Now you can use that password to log in with the Parse CLI.
Related
I am trying to access logs from an app. Apparently, the only way to do that is the herkoku client.
I am working remotely. When I do
heroku login -i
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.
But there is no link provided where or how to get such a token.
And the documentation does not mention the creation of such a token. Only how to store it.
Any ideas?
While logged in to the Heroku web interface, go to "Account settings" (in the menu under your avatar in the top right) and scroll down to "API Key". Generate one if there isn't one already, or click "Reveal" to see the existing one.
Now, re-run heroku login -i, and enter your email as normal, but enter that API key instead of your account password.
The above method works. But: You have to type this password into the CLI. Cutting and pasting does not work.
I just created a GitLab account, I signed up by using the "Using google" option, and it just prompted me for my gmail credentials. The email in question is a company email I was given by my administrators.
When I wanted to use these credentials in Visual Studio, it asked me with this screen for my credentials:
I entered my company email and its password, but I received this error from Visual Studio:
Fetching from origin
Remote: HTTP Basic: Access denied
Error encountered while fetching: Git failed with a fatal error.
Authentication failed for 'https://gitlab.com/xxxxxxx/xxxxx/xxxxxxx.git/
I wanted to make sure the credentials were properly set, so I went to gitlab page and signed out. When trying to sign in, same thing happens. I am allowed to sign in to gitlab if I use "Using google" option, but not via email + password.
Is this a problem?, do you know any workaround I could use to sing into my gitlab account within Visual Studio?
When you created your account, it's bound to your google credentials. You can see it's connected by clicking on your profile icon in the upper right corner and clicking "Preferences > Account". Under Social Sign-in, you'll see that the google button now shows "Disconnect Google". When you do this, GitLab does not assign you a username by default (honestly, it may now, but it didn't when I created my account several years ago). However, you can change your username on that same "Preferences > Account" page under the "Change username" heading, so go ahead and assign yourself one if you don't have one there. If you already have one, go ahead and take note of that.
Once you have your username, you can likely authenticate using an access token instead of a password. Create an access token under "Preferences > Access Token" and assign the privileges you want depending on what you are going to do with VS.
If you really want to use a password instead (or if the VS plugin doesn't work with an access token), you can set a password under "Preferences > Password", and use that instead.
Hopefully this helps!
Go to https://gitlab.com/-/profile/personal_access_tokens
Result
Use this token as password for you enter to the form what you seen.
When using Heroku Multi-Factor Authentication, is there any way to login via the console without opening the browser?
ubuntu:~/environment $ heroku login -i
heroku: Enter your login credentials
Email [hello#gmail.com]:
Password: ****************
› 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
Yes. Basically, to set this up what you want to do is:
Login to Heroku and create an API Token under "Account settings". (You said "without opening a browser", and I'm assuming you mean 'How to authenticate from the command-line'. To set this up you will need to open a browser ... once ;)
In your local machine's home directory, check to see if you already have a file called .netrc. If not, simply create one like so -- touch ~/.netrc.
From there you'll want to append the following to that file (and save):
machine api.heroku.com
login <your-email-goes-here>
password <the-api-token-goes-here>
machine git.heroku.com
login <your-email-goes-here>
password <the-api-token-goes-here>
If you just created the .netrc file you'll want to chmod 600 .netrc to give it necessary permissions.
At this point, you can try the command heroku auth:whoami and hopefully see your user e-mail printed back to you.
FWIW, Heroku does have some docs covering this here, but to be honest, the docs are rather disjointed and I would think unhelpful to someone that's never done something like this before, which is why I tried to go step-by-step.
I hope this is what you wanted and / or someone finds this helpful :)
For multi-factor authentication enabled heroku account, If you can get the API key then there is a simpler way to sign in via CLI. type -> heroku login -i
enter the email id associated with your heroku account and for password you must enter the API key that you got from the account settings page.
The first time we run hub, it asks for our Github username and password. This is never stored. Instead, hub uses it to create a personal access token that gets saved in your account and then it uses that token for subsequent uses.
Is there a way to achieve the same from a bash script, without registering an application and all that?
This script will be public.
without registering an application
Not exactly, since it is part of the oauth workflow.
But from a simple shell, you can store your GitHub username and password in a credential helper like libsecret (Mac) or manager (Windows).
In that case, you won't have to enter said credentials again and you don't have to register anything directly on GitHub.
I am using cloud code, and I have two Parse accounts. I have authorized the first Parse account, but I want to add cloud code to the new Parse account, but whenever I do Parse add, it automatically takes me to the list of apps with the parse account I have authorized, how do I pull up the apps from the other account?
According to the Parse Github Issues Page, there is no logout, but you can change the default key you're using by parse configure accountkey -d
Hope that helps!