Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clone a gist using https:// instead of git://

Tags:

gist

At my office we are not able to connect to github using git:// urls. For the regular repositories we just juse the https:// url and we're fine.

For gist there does not appear to be a way to access the gist via an https:// url.

BTW, I cannot seem to find any github documentation about gist ... I recall reading a page on github(?) about gist, but for the life of me I cannot find anything on the site itself that documents gist ... of course google is useless as gist show up everywhere ... but no documentation links:(

Thanks in advance.

like image 238
Dale Henrichs Avatar asked Mar 08 '12 01:03

Dale Henrichs


People also ask

Can you clone a gist?

Gists are actually Git repositories, which means that you can fork or clone any gist, even if you aren't the original author. You can also view a gist's full commit history, including diffs.

What is the difference between cloning with SSH and HTTPS?

The difference is in the protocol used, as you probably guessed. Assuming you don't much care about the technical details between HTTPS and ssh, ssh has the advantage that you can use public key authentication, while you must use a username and password with HTTPS.


1 Answers

You can configure git to use https:// globally by running running git config --global url."https://".insteadOf git:// or by adding the following to ~/.gitconfig:

[url "https://"]
  insteadOf = git://
like image 169
fny Avatar answered Nov 25 '22 11:11

fny