How to get the password for Glitch Username and Password for API to fetch the project?


#1

Pretty much what title says.


Renewal of previous post
Fatal: Authentication failed for 'https://api.glitch.com/myprojectname/git/'
#2

Hey @boltxyz what are you referring to when you say “fetch the project”? Are you talking about using your project as a git repo or something else?


#3

I want to fetch the Glitch project to a local directory on my desktop, however, the console asks for username and password for “https://api.glitch.com”, and I am not quite sure what exactly it is asking for as i’ve tried entering my Glitch account username and password. But, neither of them seemed to work, instead there was an error.
The error:

fatal: Authentication failed for 'https://api.glitch.com/proj-name/git/'

Thanks for the help…


#4

Hiya @boltxyz!

If you’re just trying to clone the project then it should be as simple as git clone https://api.glitch.com/proj-name/git and you should get a copy locally. If you’re trying to push back to the Glitch-based repo (or if you’re cloning a private project) then you need to flip the switch on the Read/Write toggle in the Git section of the Advanced Options to write and collect the user name by clicking on “copy user name”.

You’ll use that with an empty password to set up the Glitch repo as a remote, you the address you would use would look something like https://PUT-YOUR-USER-NAME-HERE:@api.glitch.com/proj-name/git - the “:@” part basically means “use a blank password”.

If that doesn’t help can you post the actual command you’re running and the project name so we can take a look?


MOD EDIT: edited for clarity


#5

How to retrieve the API token?


#6

That’s what you get when you click “Copy User Name”.


#7

So, the CLI requests for the API username and password:

Username for 'https://api.glitch.com': projname:
Password for 'https://projname:@api.glitch.com': 

I have tried copying username of the project and fill the field with it, and empty password, however, does not seem to work.


#8

In the CLI you want to use the value you get from clicking “Copy User Name” in the username prompt, and leave the password blank. Your project name should be in the url you’re cloning from.


#9

However, it throws an error.

fatal: Authentication failed for 'https://api.glitch.com/proj-name/git/'

My project is private.


#10

That’s very … odd. When I do these steps I’m able to clone a private project of mine; prompted for a username, using the copied username from the git section of the advanced menu and pressing for the password.

Can you provide your project name so I can take a closer look? You can email it to support@glitch.com if you’d prefer.


#11

The project name is alphadev, it is private, and only staff can look up. So, it’s fine.


#12

I wanted to clone the Glitch project and write it, however, I wasn’t able to clone the project due to the error: fatal: Authentication failed for 'https://api.glitch.com/myprojectname/git/'

I ran
git clone https://api.glitch.com/myprojectname/git/ in the console.
It prompted for username & password for the API
I went to the project page and copied user name by clicking the write section and “Copy User Name” and left the password field empty as “Password is an empty string” was written.
And console threw that error.

I’d created an issue about this and was said that “We will look into it.” and never received a reply.


#13

Thanks, @boltxyz, we received your project name yesterday and haven’t had a chance to look into it more deeply. We’ll take a look as soon as we can and will let you know what we find when we’ve had a chance to look.


#14

Please reply once resolved.


Renewal of previous post
#15

I haven’t been able to solve this issue: https://support.glitch.com/t/how-to-get-the-password-for-glitch-username-and-password-for-api-to-fetch-the-project/7233/14


#16

Hey @boltxyz my apologies; I thought I replied but I guess I just thought about replying.

We believe there’s something strange going on with your project’s git repo, but it’s not clear exactly what that might be. I was able to clone from a remix of your project, so I suggest you remix the project; swap names (and secrets) and move forward using the remix.


#17

Thanks for the reply, I’ll do that…