Gogs: Cannot use Gogs in Termux environment (Android)

Created on 3 Nov 2017  ·  3Comments  ·  Source: gogs/gogs

  • Gogs version (or commit ref): 0.11.29.0727
  • Git version: 2.15.0
  • Operating system: Android 6.0 (Termux shell environment) [armhf(v7l), using armv5 binaries]
  • Database (use [x]):

    • [x] PostgreSQL

    • [ ] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gogs.io:

    • [ ] Yes (provide example URL)

    • [ ] No

    • [x] Not relevant

  • Log gist (usually found in log/gogs.log)

    Description

Seen an error 500 while creating repository (relevant to any user/repo):
An error has occurred : initRepository: initRepoCommit: git push: fatal: cannot run hooks/pre-receive: No such file or directory To /data/data/com.termux/files/home/gogs-repositories/kamehb-ua/unwatched.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to '/data/data/com.termux/files/home/gogs-repositories/kamehb-ua/unwatched.git'

Screen above:

image

💊 bug 📦 deployment 🙇‍♂️ help wanted

Most helpful comment

look at unwatched.git/hook/update
This is a server-side hook check. In side of the file it should be a gogs/gogs hook...
make sure /usr/bin/env and bash are working.

All 3 comments

look at unwatched.git/hook/update
This is a server-side hook check. In side of the file it should be a gogs/gogs hook...
make sure /usr/bin/env and bash are working.

Don't get confused with the hook pre-receive in the Git Hooks of gogs

https://[user server, e.g.:192.168.0.105:3000]/[username]/[repo]/settings/hooks/git/pre-receive
This thing doesn't seem to work as of 0.11.53

look at unwatched.git/hook/update
This is a server-side hook check. In side of the file it should be a gogs/gogs hook...
make sure /usr/bin/env and bash are working.

Thanks, @weinianhe. Issue may be closed now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

r0bc94 picture r0bc94  ·  3Comments

Lord0 picture Lord0  ·  3Comments

ozzi- picture ozzi-  ·  3Comments

suriyaa picture suriyaa  ·  3Comments

fromiuan picture fromiuan  ·  3Comments