mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
fixing default ssh logic
This commit is contained in:
1 parent
4f7ce9c195
commit
ea42ed406f
2 files changed
+16
-2
No files matched your search
@@ -1,6 +1,16 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
1.16.1
|
||||||
|
----
|
||||||
|
- Fixing default ssh auth logic
|
||||||
|
|
||||||
|
1.16.0
|
||||||
|
----
|
||||||
|
- Better commit coverage. Now iterates through each commit in git log and generates a patch with each commit's parent.
|
||||||
|
- Removing the need for --private/-p option. Instead gitleaks will determine if the repo is private or not.
|
||||||
|
|
||||||
|
|
||||||
1.15.0
|
1.15.0
|
||||||
----
|
----
|
||||||
- Whitelist repos use regex now
|
- Whitelist repos use regex now
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ type entropyRange struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultGithubURL = "https://api.github.com/"
|
const defaultGithubURL = "https://api.github.com/"
|
||||||
const version = "1.16.0"
|
const version = "1.16.1"
|
||||||
const errExit = 2
|
const errExit = 2
|
||||||
const leakExit = 1
|
const leakExit = 1
|
||||||
const defaultConfig = `
|
const defaultConfig = `
|
||||||
@@ -876,7 +876,11 @@ func getSSHAuth() (*ssh.PublicKeys, error) {
|
|||||||
if opts.SSHKey != "" {
|
if opts.SSHKey != "" {
|
||||||
sshKeyPath = opts.SSHKey
|
sshKeyPath = opts.SSHKey
|
||||||
} else {
|
} else {
|
||||||
c, _ := user.Current()
|
// try grabbing default
|
||||||
|
c, err := user.Current()
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
sshKeyPath = fmt.Sprintf("%s/.ssh/id_rsa", c.HomeDir)
|
sshKeyPath = fmt.Sprintf("%s/.ssh/id_rsa", c.HomeDir)
|
||||||
}
|
}
|
||||||
sshAuth, err := ssh.NewPublicKeysFromFile("git", sshKeyPath, "")
|
sshAuth, err := ssh.NewPublicKeysFromFile("git", sshKeyPath, "")
|
||||||
|
|||||||
Reference in new issue
Block a user