termux / termux/termux-docker

`gh auth login` has `tls: failed to verify certificate: x509: certificate signed by unknown authority`

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
731
Forks
109
PR merge metrics
No merged PRs in 30d

Description

This issue is to track the termux-docker variant of tls: failed to verify certificate: x509: certificate signed by unknown authority.

Every type of termux-docker has this issue, and my recent heavy changes did not introduce it. Unfortunately, I didn't fix it because I don't know how to.

Sometimes, GNU/Linux or normal Android can have tls: failed to verify certificate: x509: certificate signed by unknown authority also, but when they do, it's thought to be due to a different root cause, because generic solutions for this error from GNU/Linux and normal Android don't seem to help.

Some known affected programs:

GitHub CLI
Git LFS

Most programs are not known to be affected.

Reproduction steps
GitHub CLI
docker run -it termux/termux-docker:x86_64 # any architecture
pkg upgrade
pkg install gh
gh auth login
Git LFS

https://github.com/termux-user-repository/tur/blob/f7e2985791ed5824f3e3600deff4243c2ce3b711/tur-on-device/blender4/build.sh#L48-L57

Only currently known workarounds
GitHub CLI
# add the SSH remote of your repo to your local clone
git remote add ssh git@github.com:you/your-repo.git
# create SSH key inside termux-docker and add it to your GitHub account, then
git push -f ssh your-branch
Git LFS
export GIT_SSL_NO_VERIFY=1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in the termux/termux-docker image with pkg upgrade, pkg install gh, and gh auth login; also inspect the referenced Git LFS build.sh section. Trace why certificate authorities are unavailable in termux-docker, then verify that GitHub CLI and Git LFS work without SSH-only access or GIT_SSL_NO_VERIFY=1.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, git, github, shell
Domain
devops, infrastructure, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.