Skip to content

Commit

Permalink
fix connection à redmine
Browse files Browse the repository at this point in the history
  • Loading branch information
agallou committed Dec 26, 2022
1 parent a036858 commit 48e8ec6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions toggl-to-redmine.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "strconv"
import "regexp"
import "flag"
import "os"
import "crypto/tls"

func main() {
boolRun := flag.Bool("run", false, "Send TimeEntries to redmine")
Expand Down Expand Up @@ -76,6 +77,10 @@ func main() {
panic("Env var T2R_TOGGL_PROJECT_ID has not been set")
}

// on évite une erreur x509: certificate signed by unknown authority
// mais ça serait mieux de passer par une variable d'environnement
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

togglProjectId, err := strconv.Atoi(togglProjectIdString)
if err != nil {
panic(err)
Expand Down

0 comments on commit 48e8ec6

Please sign in to comment.