Skip to content

Commit afcaf83

Browse files
dsabetigeofffranks
andcommitted
Disable git-crypt integration
Signed-off-by: Geoff Franks <[email protected]> Co-authored-by: Geoff Franks <[email protected]>
1 parent aa3b0a6 commit afcaf83

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ RUN apk add --update --no-cache \
1515
openssh
1616

1717
COPY scripts/askpass.sh /usr/local/bin/askpass.sh
18-
ADD scripts/install_git_crypt.sh install_git_crypt.sh
19-
RUN ./install_git_crypt.sh && rm ./install_git_crypt.sh
2018

2119
COPY --from=builder /go/src/github.com/cloudfoundry-community/github-pr-instances-resource/build /opt/resource
2220

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ for a single PR.
101101
| `paths` | No | `["terraform/*/*.tf"]` | Only produce new versions for commits that include changes to files that match one or more glob patterns or prefixes. Note: this differs from `source.paths` when listing PRs in that it applies on a commit-by-commit basis, whereas the former applies for the full PR. |
102102
| `ignore_paths` | No | `[".ci/"]` | Inverse of the above. Pattern syntax is documented in [filepath.Match](https://golang.org/pkg/path/filepath/#Match), or a path prefix can be specified (e.g. `.ci/` will match everything in the `.ci` directory). |
103103
| `disable_ci_skip` | No | `true` | Disable ability to skip builds with `[ci skip]` and `[skip ci]` in the commit message. |
104-
| `git_crypt_key` | No | `AEdJVENSWVBUS0VZAAAAA...` | Base64 encoded git-crypt key. Setting this will unlock / decrypt the repository with git-crypt. To get the key simply execute `git-crypt export-key -- - | base64` in an encrypted repository. |
105104
| `disable_git_lfs` | No | `true` | Disable Git LFS, skipping an attempt to convert pointers of files tracked into their corresponding objects when checked out into a working copy. |
106105
| `skip_ssl_verification` | No | `true` | Disable SSL/TLS certificate validation on API clients. Use with care! |
107106

@@ -186,7 +185,7 @@ params:
186185
get_params: {skip_download: true}
187186
```
188187
189-
git-crypt encrypted repositories will automatically be decrypted when the `git_crypt_key` is set in the source configuration.
188+
**NOTE:** git-crypt encrypted repositories are currently unsupported.
190189
191190
Note that, should you retrigger a build in the hopes of testing the last commit to a PR against a newer version of
192191
the base, Concourse will reuse the volume (i.e. not trigger a new `get`) if it still exists, which can produce

models/git.go

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package models
22

33
import (
4-
"encoding/base64"
54
"fmt"
65
"io"
76
"io/ioutil"
87
"net/url"
98
"os"
109
"os/exec"
11-
"path/filepath"
1210
"strconv"
1311
"strings"
1412
)
@@ -282,23 +280,7 @@ func (g *GitClient) Rebase(baseRef string, headSha string, submodules bool) erro
282280

283281
// GitCryptUnlock unlocks the repository using git-crypt
284282
func (g *GitClient) GitCryptUnlock(base64key string) error {
285-
keyDir, err := ioutil.TempDir("", "")
286-
if err != nil {
287-
return fmt.Errorf("failed to create temporary directory")
288-
}
289-
defer os.RemoveAll(keyDir)
290-
decodedKey, err := base64.StdEncoding.DecodeString(base64key)
291-
if err != nil {
292-
return fmt.Errorf("failed to decode git-crypt key")
293-
}
294-
keyPath := filepath.Join(keyDir, "git-crypt-key")
295-
if err := ioutil.WriteFile(keyPath, decodedKey, os.FileMode(0600)); err != nil {
296-
return fmt.Errorf("failed to write git-crypt key to file: %s", err)
297-
}
298-
if err := g.command("git-crypt", "unlock", keyPath).Run(); err != nil {
299-
return fmt.Errorf("git-crypt unlock failed: %s", err)
300-
}
301-
return nil
283+
return fmt.Errorf("GitCrypt Unsupported")
302284
}
303285

304286
// Endpoint takes an uri and produces an endpoint with the login information baked in.

0 commit comments

Comments
 (0)