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

[Bug] SKIP_TLS_VERIFY=true not working on webhook #8787

Closed
2 of 7 tasks
toni-moreno opened this issue Nov 2, 2019 · 7 comments
Closed
2 of 7 tasks

[Bug] SKIP_TLS_VERIFY=true not working on webhook #8787

toni-moreno opened this issue Nov 2, 2019 · 7 comments
Labels
issue/stale type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@toni-moreno
Copy link

  • Gitea version (or commit ref):
  • Git version:
    Gitea version 1.11.0+dev-146-g232340f5e built with GNU Make 4.2.1, go1.13.4 : bindata, sqlite, sqlite_unlock_notify
  • Operating system:
    Docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Gitea is not able to launch remote webhook, even when SKIP_TLS_VERIFY=true environment variable is set.

2019/11/02 11:12:51 ...s/graceful/server.go:87:NewServer() [I] Starting new server: tcp:0.0.0.0:3000 on PID: 18
2019/11/02 11:13:38 ...s/webhook/deliver.go:179:DeliverHooks() [E] deliver: Post https://drone.myserver.io/hook?secret=5Bq2GZ8BWY9yHiG3KPpFud5Gqu56tj8m: x509: certificate is valid for 2a22c8a50bcf6fe0a18245ddbd8979b3.1c13c9704e69fcdb724d9de94cf8e6ae.traefik.default, not drone.myserver.io

This is my service config.

version: "3.3"
services:
  git:
    image: gitea/gitea:latest 
    environment:
      - USER_UID=1001
      - USER_GID=1001
      - DB_TYPE=postgres
      - DB_HOST=git-db:5432
      - DB_NAME=gitea
      - DB_USER=${WEB_ADMIN_USERNAME}
      - DB_PASSWD=${WEB_ADMIN_PASSWORD}
      - SSH_DOMAIN=git.${WEB_DOMAIN}
      - SKIP_TLS_VERIFY=true
    networks:
      - net-public
    volumes:
      - gitea-data:/data
    ports:
      - "3000:3000"
      - "2222:22"
    deploy:
      placement:
        constraints:
          - node.labels.role.git == true
      labels:
        - traefik.enable=true
        - traefik.frontend.rule=Host:git.${WEB_DOMAIN}
        - traefik.docker.network=net-public
        - traefik.port=3000
        - traefik.tags=net-public
        - traefik.redirectorservice.frontend.entryPoints=http
        - traefik.redirectorservice.frontend.redirect.entryPoint=https
        - traefik.webservice.frontend.entryPoints=https
@lunny
Copy link
Member

lunny commented Nov 2, 2019

We haven't support SKIP_TLS_VERIFY environment, you have to set that via app.ini.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Nov 2, 2019
@toni-moreno
Copy link
Author

@lunny I've seen that Dockerimage doesn't contain the app.ini file , so I suspect Dockerfile generates by itself on container start with environment variables, so I have a question.

Could I mount only with this option and with the environment variables?

/my_app.ini:/data/gitea/conf/app.ini

with only this option in my_app.ini ?

[webhook]

SKIP_TLS_VERIFY = true

@toni-moreno
Copy link
Author

Hi @lunny I've tested , and remembered that app.ini is created in the setup phase, so previous solution doesn't work.

Could be good if addedSKIP_TLS_VERIFY as environment var.

Thank you for your attention.

@zeripath
Copy link
Contributor

zeripath commented Nov 3, 2019

This is yet another example of a thing that #7287 would fix... The environment variable would be GITEA__WEBHOOK__SKIP_TLS_VERIFY

@toni-moreno toni-moreno reopened this Nov 5, 2019
@toni-moreno
Copy link
Author

After doing a new installation with docker , I realized that is not a good idea to map an app.ini file if you can not create the admin user , and I can 't (#8763) , so is needed this variable as @zeripath suggested or fix the admin creation tool.

@stale
Copy link

stale bot commented Jan 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Jan 4, 2020
@stale
Copy link

stale bot commented Jan 19, 2020

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Jan 19, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

3 participants