Skip to content

Commit 7ff5111

Browse files
committed
Use https for GitHub urls
1 parent c2d71b2 commit 7ff5111

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

en/book/02-git-basics/chapter2.asc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ You clone a repository with `git clone [url]`. For example, if you want to clone
3737

3838
[source,shell]
3939
----
40-
$ git clone git://github.com/schacon/grit.git
40+
$ git clone https://github.com/schacon/grit.git
4141
----
4242

4343
That creates a directory named ``grit'', initializes a `.git` directory inside it, pulls down all the data for that repository, and checks out a working copy of the latest version. If you go into the new `grit` directory, you’ll see the project files in there, ready to be worked on or used. If you want to clone the repository into a directory named something other than grit, you can specify that as the next command-line option:
4444

4545
[source,shell]
4646
----
47-
$ git clone git://github.com/schacon/grit.git mygrit
47+
$ git clone https://github.com/schacon/grit.git mygrit
4848
----
4949

5050
That command does the same thing as the previous one, but the target directory is called `mygrit`.
@@ -281,7 +281,7 @@ index 0000000..03902a1
281281
@@ -0,0 +1,5 @@
282282
+grit
283283
+ by Tom Preston-Werner, Chris Wanstrath
284-
+ http://github.com/mojombo/grit
284+
+ https://github.com/mojombo/grit
285285
+
286286
+Grit is a Ruby library for extracting information from a Git repository
287287
----
@@ -900,7 +900,7 @@ To see which remote servers you have configured, you can run the `git remote` co
900900

901901
[source,shell]
902902
----
903-
$ git clone git://github.com/schacon/ticgit.git
903+
$ git clone https://github.com/schacon/ticgit.git
904904
Cloning into 'ticgit'...
905905
remote: Reusing existing pack: 1857, done.
906906
remote: Total 1857 (delta 0), reused 0 (delta 0)
@@ -917,7 +917,7 @@ You can also specify `-v`, which shows you the URL that Git has stored for the s
917917
[source,shell]
918918
----
919919
$ git remote -v
920-
origin git://github.com/schacon/ticgit.git
920+
origin https://github.com/schacon/ticgit.git
921921
----
922922

923923
If you have more than one remote, the command lists them all. For example, my Grit repository looks something like this.
@@ -926,14 +926,14 @@ If you have more than one remote, the command lists them all. For example, my Gr
926926
----
927927
$ cd grit
928928
$ git remote -v
929-
bakkdoor git://github.com/bakkdoor/grit.git
930-
cho45 git://github.com/cho45/grit.git
931-
defunkt git://github.com/defunkt/grit.git
929+
bakkdoor https://github.com/bakkdoor/grit.git
930+
cho45 https://github.com/cho45/grit.git
931+
defunkt https://github.com/defunkt/grit.git
932932
koke git://github.com/koke/grit.git
933933
origin [email protected]:mojombo/grit.git
934934
----
935935

936-
This means we can pull contributions from any of these users pretty easily. But notice that only the origin remote is an SSH URL, so it’s the only one I can push to (we’ll cover why this is in <<_git_on_the_server>>).
936+
This means we can pull contributions from any of these users pretty easily. Notice that these remotes use a variety of protocols; we’ll cover why more about this in <<_git_on_the_server>>.
937937

938938
==== Adding Remote Repositories
939939

@@ -943,12 +943,12 @@ I’ve mentioned and given some demonstrations of adding remote repositories in
943943
----
944944
$ git remote
945945
origin
946-
$ git remote add pb git://github.com/paulboone/ticgit.git
946+
$ git remote add pb https://github.com/paulboone/ticgit.git
947947
$ git remote -v
948-
origin git://github.com/schacon/ticgit.git (fetch)
949-
origin git://github.com/schacon/ticgit.git (push)
950-
pb git://github.com/paulboone/ticgit.git (fetch)
951-
pb git://github.com/paulboone/ticgit.git (push)
948+
origin https://github.com/schacon/ticgit.git (fetch)
949+
origin https://github.com/schacon/ticgit.git (push)
950+
pb https://github.com/paulboone/ticgit.git (fetch)
951+
pb https://github.com/paulboone/ticgit.git (push)
952952
----
953953

954954
Now you can use the string `pb` on the command line in lieu of the whole URL. For example, if you want to fetch all the information that Paul has but that you don’t yet have in your repository, you can run `git fetch pb`:
@@ -960,7 +960,7 @@ remote: Counting objects: 43, done.
960960
remote: Compressing objects: 100% (36/36), done.
961961
remote: Total 43 (delta 10), reused 31 (delta 5)
962962
Unpacking objects: 100% (43/43), done.
963-
From git://github.com/paulboone/ticgit
963+
From https://github.com/paulboone/ticgit
964964
* [new branch] master -> pb/master
965965
* [new branch] ticgit -> pb/ticgit
966966
----
@@ -1000,8 +1000,8 @@ If you want to see more information about a particular remote, you can use the `
10001000
----
10011001
$ git remote show origin
10021002
* remote origin
1003-
Fetch URL: git://github.com/schacon/ticgit.git
1004-
Push URL: git://github.com/schacon/ticgit.git
1003+
Fetch URL: https://github.com/schacon/ticgit.git
1004+
Push URL: https://github.com/schacon/ticgit.git
10051005
HEAD branch: master
10061006
Remote branches:
10071007
master tracked

0 commit comments

Comments
 (0)