Skip to content

Commit

Permalink
PrivateKey with or without extra char as newline will be accepted by …
Browse files Browse the repository at this point in the history
…vendir

Signed-off-by: kumari tanushree <[email protected]>
  • Loading branch information
kumari tanushree committed Jan 5, 2024
1 parent 0b54783 commit d4b23fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/vendir/fetch/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (t *Git) fetch(dstPath string, tempArea ctlfetch.TempArea) error {
if authOpts.PrivateKey != nil {
path := filepath.Join(authDir, "private-key")

err = os.WriteFile(path, []byte(*authOpts.PrivateKey), 0600)
err = os.WriteFile(path, []byte(*authOpts.PrivateKey+"\n"), 0600)
if err != nil {
return fmt.Errorf("Writing private key: %s", err)
}
Expand Down

0 comments on commit d4b23fb

Please sign in to comment.