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

Pretty much what title says.

Hey @chroventer 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?

1 Like

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…

Hiya @chroventer!

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

2 Likes

How to retrieve the API token?

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

1 Like

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.

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.

1 Like

However, it throws an error.

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

My project is private.

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.

1 Like

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

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.

Thanks, @chroventer, 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.

1 Like

Please reply once resolved.

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

Hey @chroventer 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.

1 Like

Thanks for the reply, I’ll do that…