Smart HTTP not working #625

Closed
opened 2024-03-06 18:30:12 +00:00 by ncrmro · 5 comments
ncrmro commented 2024-03-06 18:30:12 +00:00 (Migrated from gitea.com)

Howdy I'm trying to use Obsidian Git Sync over HTTP and I get a Smart HTTP error. I did a bit of reading and this seems to be a CGI scrip that gets executed but I'm using ingress-nginx. I guess I would need to put gitea behind apache? I know nginx can do CGI also I think but I recall it not being supported well by ingress-nginx.

Smart HTttpError: Remote did not reply using "smart" HTTP protocol.

Any pointers or ideas?

Howdy I'm trying to use Obsidian Git Sync over HTTP and I get a Smart HTTP error. I did a bit of reading and this seems to be a CGI scrip that gets executed but I'm using ingress-nginx. I guess I would need to put gitea behind apache? I know nginx can do CGI also I think but I recall it not being supported well by ingress-nginx. > Smart HTttpError: Remote did not reply using "smart" HTTP protocol. Any pointers or ideas?
justusbunsi commented 2024-03-06 18:34:31 +00:00 (Migrated from gitea.com)

In what way is this related to the helm chart? Happy to help if so. 🙂

In what way is this related to the helm chart? Happy to help if so. 🙂
ncrmro commented 2024-03-06 19:23:02 +00:00 (Migrated from gitea.com)

@justusbunsi Smart HTTP is releated this this helm chart because Gitea at the application layer seems to support it, it is astandard feature in Github etc and it a feature in core git. I'm not able to sync Obsidian Notes git plugin to my private gitea instance installed via this helm chart.

Per Gitea guidelines for back end deployment

routers/web will handle HTTP requests from web browsers or Git SMART HTTP protocols.

Helm Charts typically should set any required or optional infrastructure or at least provide notes mentioning certain features (like Smart HTTP) won't work without additional configuration.

I've checked the go-gitea/gitea repo and this one for issues mentioning Smart HTTP and I'm not finding a lot.

I'm just wondering if anyone has any details or solutions around getting Smart HTTP functionality to work and provide a place to show up for others searching for this issue.

I've never come across Smart HTTP and i'm just hopping to get Obsidian git plugin working (i'm sure others will also like to keep their notes hosted on private git).

@justusbunsi Smart HTTP is releated this this helm chart because Gitea at the application layer seems to support it, it is astandard feature in Github etc and it a [feature in core git](https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP). I'm not able to sync Obsidian Notes git plugin to my private gitea instance installed via this helm chart. Per Gitea guidelines for [back end deployment](https://docs.gitea.com/contributing/guidelines-backend) > routers/web will handle HTTP requests from web browsers or Git SMART HTTP protocols. Helm Charts typically should set any required or optional infrastructure or at least provide notes mentioning certain features (like Smart HTTP) won't work without additional configuration. I've checked the go-gitea/gitea repo and this one for issues mentioning Smart HTTP and I'm not finding a lot. I'm just wondering if anyone has any details or solutions around getting Smart HTTP functionality to work and provide a place to show up for others searching for this issue. I've never come across Smart HTTP and i'm just hopping to get Obsidian git plugin working (i'm sure others will also like to keep their notes hosted on private git).
justusbunsi commented 2024-03-06 20:50:32 +00:00 (Migrated from gitea.com)

Hrm. I'm still not sure if the error is related to the chart. But since I cannot rule out an issue, let's think about it 🙂: Your initial post reads like you are uncertain about the proxy being an issue here. If you want to be sure that it's not the proxy, you could try using a port-forward for testing. If you can use Obsidian sync with it. That way you are not routing through ingress-nginx.

That said, could you share your values.yaml (those different/added to the defaults)? And do you have some bullet point reproduction instructions? I've never used obsidian so far.

Hrm. I'm still not sure if the error is related to the chart. But since I cannot rule out an issue, let's think about it 🙂: Your initial post reads like you are uncertain about the proxy being an issue here. If you want to be sure that it's not the proxy, you could try using a port-forward for testing. If you can use Obsidian sync with it. That way you are not routing through ingress-nginx. That said, could you share your values.yaml (those different/added to the defaults)? And do you have some bullet point reproduction instructions? I've never used obsidian so far.
ncrmro commented 2024-03-06 22:58:43 +00:00 (Migrated from gitea.com)

@justusbunsi Its less that I think the proxy is the issue and more that I know I've not done anything to inform ingress-nginx ff the CGI settings that I think Smart HTTP would be set up as.

I have ran into this CGI bit in other helm charts and they typically have Apache handling any CGI.

To your point though I should prob check with the Gitea team on how Gitea implements this CGI.

global: {}
ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: REDACTED
    nginx.ingress.kubernetes.io/proxy-body-size: 0
  hosts:
    - host: REDACTED
      paths:
        - path: /
          pathType: Prefix
  tls:
    - hosts: [ "REDACTED" ]
resources:
  limits:
    cpu: 4
    memory: 1Gi
  requests:
    cpu: 100m
    memory: 128Mi
redis-cluster:
  enabled: true
  cluster:
    nodes: 3
postgresql:
  enabled: false
postgresql-ha:
  enabled: false
gitea:
  config:
    server:
      SSH_PORT: 2222
    database:
      DB_TYPE: sqlite3
      SQLITE_JOURNAL_MODE: WAL
  admin:
     existingSecret: gitea-admin-secret
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
service:
  ssh:
    type: LoadBalancer
    port: 2222
    clusterIP: ""
    externalIPs:
      - REDACTED
persistence:
  enabled: true
  size: 20Gi


Obsidian Works fine when using SSH key, on iphone thought you need a password + HTTP hence why I think this is happening. You have to download the repo zip extract and paste it over the obsidian vault in the iphone files app to get the .git folder inplace with the HTTP remote setup.

There is a community plugin that handles the git backups.

@justusbunsi Its less that I think the proxy is the issue and more that I know I've not done anything to [inform ingress-nginx](https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/) ff the CGI settings that I think Smart HTTP would be set up as. I have ran into this CGI bit in other helm charts and they typically have Apache handling any CGI. To your point though I should prob check with the Gitea team on how Gitea implements this CGI. ```yaml global: {} ingress: enabled: true className: nginx annotations: nginx.ingress.kubernetes.io/whitelist-source-range: REDACTED nginx.ingress.kubernetes.io/proxy-body-size: 0 hosts: - host: REDACTED paths: - path: / pathType: Prefix tls: - hosts: [ "REDACTED" ] resources: limits: cpu: 4 memory: 1Gi requests: cpu: 100m memory: 128Mi redis-cluster: enabled: true cluster: nodes: 3 postgresql: enabled: false postgresql-ha: enabled: false gitea: config: server: SSH_PORT: 2222 database: DB_TYPE: sqlite3 SQLITE_JOURNAL_MODE: WAL admin: existingSecret: gitea-admin-secret metrics: enabled: true serviceMonitor: enabled: true service: ssh: type: LoadBalancer port: 2222 clusterIP: "" externalIPs: - REDACTED persistence: enabled: true size: 20Gi ``` --- Obsidian Works fine when using SSH key, on iphone thought you need a password + HTTP hence why I think this is happening. You have to download the repo zip extract and paste it over the obsidian vault in the iphone files app to get the .git folder inplace with the HTTP remote setup. There is a [community plugin](https://github.com/denolehov/obsidian-git) that handles the git backups.
ncrmro commented 2024-03-06 23:05:01 +00:00 (Migrated from gitea.com)

@justusbunsi also thank you, apologies if i'm being terse and a bit hard to follow here.

I've also made a post on the forums in an attempt to see if anythin special needs to be done for the Smart HTTP stuff to work.

https://forum.gitea.com/t/gitea-smart-http/8716

@justusbunsi also thank you, apologies if i'm being terse and a bit hard to follow here. I've also made a post on the forums in an attempt to see if anythin special needs to be done for the Smart HTTP stuff to work. https://forum.gitea.com/t/gitea-smart-http/8716
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#625
No description provided.