Token authentication issues

Dear all,
I’m having troubles using my Gituhub due to “token authentication”.

I’ve created a new token.

Then if I try the example:

git clone https://github.com/username/repo.git

I get

fatal: protocol ...........

is not supported

I’m stuck over here, anyone can help me please?

Thanks,

Damian

Hey @damianoncloud and welcome! That error message doesn’t look like it’s per se related to your token. Have you tried typing out the repository name manually to avoid situations like this:

Hi mpboom,
thank you for your help. I’ve typed it manually and this what I get:

I’m cloning a private repository and this is the issue at the moment I guess.

WHAT I WOULD LIKE TO DO
I’ve downloaded a Zip project on a new Macbook.
I’ve created that project using another computer.
Now I want to modify it locally and then track changes using Git and then pushing it to Github. So, I’ve modified some files locally, then I’ve added them to the staging are and committed them but when I try to push the code to Github I get this:

I guess I have to create a personal access token, isn’t it?

The ssh: Could not resolve hostname https: message looks like you’ve been trying to use SSH for authentication but the URL is broken. You can find the correct URL by clicking the green “Code” button on the repository page and selecting the protocol you want.

The second error message says exactly what you need to do. It has nothing to do with authentication, you need to set your author information before making/pushing commits. That information is stored in each commit.

1 Like

Dear airtower-luna,
thank you so much for your answer.
What does it mean the URL is broken? What am I supposed to do?
What steps should I follow to push items on Github?
I have no idea how to fix the second step as well.

Thank you so much

The value is invalid. I can’t say exactly what is wrong without seeing the URL, but the error message tells me Git thinks it’s supposed to use an SSH connection to the host https:. Using SSH is a good choice, but https: isn’t even a valid hostname, let alone one for GitHub. The easiest thing to do is to find the correct URL from your repository page (the green “Code” button). Once you have that, you can set the URL like this:

git remote set-url origin URL_HERE

When you set up Git on a new computer or user account, you need to tell it who you are, see Git - First-Time Git Setup. That’s where the second error message comes from. If you already made commits there anyway you may need to fix the author information there.

Thank you very much for your help. I’ve managed to create a new SSH key and now I can push to Github.
Thank you
Have a nice day

1 Like