Work locally and push with git


#1

Hi,

I cloned my project with git in order to work locally.

After i create a new branch, commit some changes and then push - it requests for my username and password:

Username for ‘https://api.glitch.com’: myemail
Password for ‘https://myemail@api.glitch.com’:

and for every credentials i try (facebook, my credentials), i get:

error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401
fatal: the remote end hung up unexpectedly

any idea what should be my credentials? or am i doing something wrong?

  • i signed with facebook.

Thanks!


#2

It’s undocumented at the moment as we want to improve the UX, but the username is your access token and the password is blank. You can get your access token by viewing the dev tools console and filtering on api.


#3

i did not understand where i should get the access token from:
“by viewing the dev tools console and filtering on api”

should i run a command from the console?
is it related to a specific project or is it a general one for my account?


#4

CTRL+SHIFT+I / F12
he means the console of your browser


#5

can you please explain how? or send a photo of what i should be looking for?


#6

important: do not paste screenshots in which your access token is visible, or anyone will be able to steal your user

These instructions are for Chrome:

  1. go to glitch.com/edit (any project will be fine)
  2. if you are on Windows, press F12. If on macOS, press Cmd+Shift+I (capital i)
  3. a “webconsole” will open, with several tabs. Make sure you are in the “console” tab on it.
  4. type application.currentUser().persistentToken() and press enter

Your access token will be printed in quotes. Remove the quotes and use the token as your username in the git url, as Gareth explained above.


#7

Great we found it!
very helpful, thank you all!