Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to verify certificate: x509: certificate signed by unknown authority #36

Open
Nikola-Milovic opened this issue Aug 27, 2024 · 0 comments

Comments

@Nikola-Milovic
Copy link

Tried running this in an existing program using SQLC for go and encountered this error

# package ts
error generating code: loadModule: http.Get: https://downloads.sqlc.dev/plugin/sqlc-gen-typescript_0.1.3.wasm Get "https://downloads.sqlc.dev/plugin/sqlc-gen-typescript_0.1.3.wasm": tls: failed to verify certificate: x509: certificate signed by unknown authority

sqlc.yaml

version: "2"
plugins:
- name: ts
  wasm:
    url: https://downloads.sqlc.dev/plugin/sqlc-gen-typescript_0.1.3.wasm
    sha256: 287df8f6cc06377d67ad5ba02c9e0f00c585509881434d15ea8bd9fc751a9368
sql:
  - engine: "postgresql"
    queries: "db/queries/ecommerce.sql"
    schema:
      - "db/schemas"
    database:
      uri: postgres//postgres:postgres@postgres:5432/db
    gen:
      go:
        package: "store"
        out: "internal/ecommerce/store"
        omit_unused_structs: true
        emit_enum_valid_method: true
        output_db_file_name: "querier.go"
        output_models_file_name: "entity.go"
    codegen:
    - out: ./ts/seongine/db
      plugin: ts
      options:
        runtime: node
        driver: pg

Run it with docker run --rm -v {{pwd}}:/src -w /src kjconroy/sqlc:latest generate ( I usually add --user {{UID}}:{{GID}} but it breaks with error generating code: loadModule: failed to create cache directory: mkdir /.cache: permission denied)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant