gethugothemes / academia-hugo

Academia is a Hugo resume theme. You can showcase your academic resume, publications and talks using this theme.

Home Page:https://gethugothemes.com/products/academia/?utm_source=academia_github&utm_medium=referral&utm_campaign=github_theme_about

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permission denied for cloning via git

spinicist opened this issue · comments

Hello,

git clone git@github.com:themefisher/academia-hugo.git

results in:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Cloning over https, i.e. git clone https://github.com/themefisher/academia-hugo.git, works fine.

This is most likely an issue with your ssh key.

Let me try to guess and say that you've recently added your SSH key into github and the added that same SSH key by using ssh-add, if yes, then what happens is that adding that SSH key isn't permanent and is removed after a while (don't ask me why), so as a workaround you must then create a file in ~/.ssh/config and write IdentityFile ~/.ssh/your_private_key_name_here to it.

I have no SSH keys associated with my account at all (never got round to it).

What is the advantage of cloning via the git protocol rather than over https?

For authentication, for example, if you clone one of your repositories throught HTTPS you have to provide username and password to verify your identity.

If you use add an SSH key to your github and then locally on your machine you can clone using SSH and each time you push to the remote origin it sees that it is in fact you and doesn't ask you for any credentials.

But from what I remember cloning with SSH even without keys should work, you simply wouldn't be able to push commits to github.

Considering this is a repository you don't own and you are probably just going to add this in the themes folder for your website, then HTTPS does everything you want, which is just cloning it locally.

Thanks - but given that the majority of users will be in the same boat (won't have access to this repo), would it not be better for the instructions to suggest cloning via https instead of git?

Probably, yeah. Now that I think about it, if I'm thinking correctly, cloning through SSH, because it's git servers, would require you actually login their servers, which considering it's SSH I would assume it would be restricted, so the issue might come from there.

They probably have some information about it in their documentation somewhere, it's a matter of looking for it.

I don't think any problem can arise from using HTTP cloning, that's how it's done all the times anyways.