You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-15Lines changed: 23 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
-[Generate My Token](#generate-my-token)
7
7
-[GitHub](#github)
8
8
-[GitLab](#gitlab)
9
-
-[Compute my fileshas](#compute-my-fileshas)
9
+
-[Compute my code fingerprints](#compute-my-code-fingerprints)
10
10
-[GitHub](#github-1)
11
11
-[GitLab](#gitlab-1)
12
12
-[Bitbucket server (formely Atlassian Stash)](#bitbucket-server-formely-atlassian-stash)
@@ -15,7 +15,7 @@
15
15
16
16
## Introduction
17
17
18
-
The purpose of `src-fingerprint` is to provide an easy way to extract git related information (namely all files sha of a repository) from your hosted source version control system.
18
+
The purpose of `src-fingerprint` is to provide an easy way to extract git related information (namely all file shas of a repository) from your hosted source version control system.
19
19
20
20
This util supports 3 main version control systems:
21
21
@@ -32,6 +32,7 @@ Get the executables [here](http://github.com/gitguardian/src-fingerprint/release
32
32
### Using Homebrew
33
33
34
34
If you're using [Homebrew](https://brew.sh/index_fr) you can add GitGuardian's tap and then install src-fingerprint. Just run the following commands :
35
+
35
36
```shell
36
37
brew tap gitguardian/tap
37
38
brew install src-fingerprint
@@ -64,37 +65,43 @@ $ go get -u github.com/gitguardian/src-fingerprint/cmd/src-fingerprint
64
65
3. Click the `read repository` box. This is the only scope we need. You can set an end-date for the token validity if you want more security
65
66
4. Click on `Create personal token`. The token will only be available at this time so make sure you keep it in a safe place
66
67
67
-
## Compute my fileshas
68
+
## Compute my code fingerprints
68
69
69
70
### General information
71
+
70
72
The output format can be chosen between `jsonl`, `json`, `gzip-jsonl` and `gzip-json` with the option `--export-format`.
71
-
The default format is `jsonl`, but if you want to minimize the size of the output file choose `gzip-jsonl`.
72
-
Also, note that if you were to download fileshas for repositories of a big organization, `src-fingerprint` has a limit to process no more than 100
73
+
The default format is `gzip-jsonl` to minimize the size of the output file.
74
+
The default output filepath is `./fingerprints.jsonl.gz`. Use `--output` to override this behavior.
75
+
Also, note that if you were to download fingerprints for repositories of a big organization, `src-fingerprint` has a limit to process no more than 100
73
76
repositories. You can override this limit with the option `--limit`, a limit of 0 will process all repos of the organization.
74
77
78
+
### Default behavior
79
+
80
+
Note that by default **for github provider**, `src-fingerprint` will exclude private repositories, forks and archived repositories from the fingerprints computation. Use options `-e` or `--all` to change this behavior.
81
+
75
82
### GitHub
76
83
77
-
1. Export all file SHAs from a GitHub Org with private repositories to a file with logs:
84
+
1. Export all fingerprints from private repositories from a GitHub Org to the default path `./fingerprints.jsonl.gz` with logs:
0 commit comments