Skip to content

Commit cc297ce

Browse files
authored
Merge pull request progit#1599 from bagasme/update-git-credential-ro-usage
Update usage snippet and code explanation for git credential-read-only
2 parents ce9246f + 569179f commit cc297ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

book/07-git-tools/sections/credentials.asc

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ include::../git-credential-read-only[]
174174
<3> This loop reads from stdin until the first blank line is reached.
175175
The inputs are stored in the `known` hash for later reference.
176176
<4> This loop reads the contents of the storage file, looking for matches.
177-
If the protocol and host from `known` match this line, the program prints the results to stdout and exits.
177+
If the protocol, host, and username from `known` match this line, the program prints the results to stdout and exits.
178178

179179
We'll save our helper as `git-credential-read-only`, put it somewhere in our `PATH` and mark it executable.
180180
Here's what an interactive session looks like:
@@ -184,6 +184,7 @@ Here's what an interactive session looks like:
184184
$ git credential-read-only --file=/mnt/shared/creds get
185185
protocol=https
186186
host=mygithost
187+
username=bob
187188
188189
protocol=https
189190
host=mygithost

0 commit comments

Comments
 (0)