There I was struggling to clone a git repo into my pig of a virtual linux server (don’t ask me why I’m hosting with GoDaddy, I get sick of explaining) and hey presto I find what I’m looking for. Here’s the long and the short of it:
I wanted to clone a repo for a wordpress theme I’d been developing so I could deploy it on a site I host. Nothing out of the ordinary there.
$ cd ~/html/site_directory/wp-content/themes
I was where I wanted to be. Now to clone:
$ git clone https://github.com/jeshuamaxey/jeshua-2.0.git
I hear you cry. But I was thrown this error
Initialized empty Git repository in /home/content/YY/XXXXXXX/html/site_directory/wp-content/themes/jeshua-2.0/.git/ error: The requested URL returned error: 401 while accessing https://github.com/jeshuamaxey/minimalist.git/info/refs fatal: HTTP request failed
Well I was stumped. I took my usual course of action and pasted the error straight into Google, but this was more difficult because it was so lengthy. I don’t claim to be all that great at git, I can get by using the basics, so I was rather unsure about what was going wrong. As luck (and persistent Googling) would have it, I found this blog post which had the answer I was looking for. By command warped to
git clone https://firstname.lastname@example.org/jeshuamaxey/jeshua-2.0.git
I was good to go. And now I have a blog post to refer back to if I ever forget this lesson. There you were thinking I blog to let people know interesting things. This is my blog post. MINE!
PS: In case you’re wondering how I managed to instal git on GoDaddy hosting, see this blog post – just be warned there is a point where
~/.bashrc is referenced when it ought to be