Skip to content

[Bug]: New-project GitHub publishing selects SSH despite working HTTPS authentication #18701

Closed

Description

@moshemiz06

Before submitting

  • I searched existing issues and did not find a duplicate for new-project publishing.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web and apps/server

Steps to reproduce

  1. On the T3 server's machine, authenticate GitHub CLI over HTTPS and configure its Git credential helper. Confirm gh config get git_protocol returns https and HTTPS access to a private repository works.
  2. Use a machine without a GitHub SSH key or a github.com entry in known_hosts.
  3. In T3, create a project from a name and enable the GitHub repository option.
  4. T3 creates the local project and its initial commit, creates the private GitHub repository, attaches an SSH origin, and fails to push.
  5. Try pushing the project's existing commits from T3. The push fails again with host_key_unverified.

Expected behavior

Creating and publishing a GitHub project should work with the authenticated HTTPS setup. The default should be consistent with GitHub's HTTPS clone default, or respect the user's configured Git protocol. Explicit SSH selection can remain available.

Actual behavior

The GitHub repository exists but is empty. The local project has commits, an SSH remote, and no upstream. T3 reports that it could not create the repository even though creation succeeded. Its suggested recovery is to use Publish Repository in the Git menu, but that action is unavailable once origin exists.

The cause is present in the source for the installed release:

Related: #4203 was closed after fixing GitHub cloning to default to HTTPS. This report covers new-project publishing, which still takes the SSH path in this release. #13350 concerns GitLab cloning.

Impact

Major degradation or frequent failure. New-project GitHub publishing fails on a machine with working HTTPS authentication, and subsequent pushes remain blocked.

Version or commit

0.0.46-nightly.20261011.2994, release commit d07a07f33c0a1b317dea6234636976231c3688b5.

Environment

Ubuntu 26.04.1 LTS, x86_64; Git 2.53.0; GitHub CLI 2.102.0; headless t3 serve; private GitHub repository; GitHub CLI Git protocol https.

Logs or stack traces

Relevant server trace entries from 2026-10-12, with local paths redacted:

15:46:56 UTC — Git command failed in GitVcsDriver.pushCurrentBranch.pushWithRequestedRemote (<project>): Git command exited with a non-zero status. (host_key_unverified)
16:00:35 UTC — Git command failed in GitVcsDriver.pushCurrentBranch.pushWithUpstream (<project>): Git command exited with a non-zero status. (host_key_unverified)

gh config get git_protocol
https

git ls-remote origin
Host key verification failed.
fatal: Could not read from remote repository.

Workaround

Switch this project's remote to HTTPS and push the existing commits:

git remote set-url origin https://github.com/OWNER/REPO.git
git push --set-upstream origin main

This succeeded on the affected machine. The private repository now has main; its remote SHA matches local HEAD, and the clean local branch tracks origin/main. No new or empty commit was needed.

Activity

  1. juliusmarminge commented on Oct 12, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Confirmed on main: new-project publishing has no way to pick HTTPS. useNewProject.ts calls publishRepository without a protocol, and selectRemoteUrl treats a missing/auto protocol as sshUrl. SSH is a deliberate default (the Git menu's Publish Repository dialog also starts on SSH), but that dialog lets you switch to HTTPS. The new-project flow doesn't, and T3 never reads gh config get git_protocol.

    The recovery hint makes this worse. It says to "use Publish Repository in the Git menu", but that action is unavailable once origin exists. So the repo is created empty and you can't get out of it from inside T3.

    Workaround (as you found):

    git remote set-url origin https://github.com/OWNER/REPO.git
    git push --set-upstream origin main

    Likely fix: add a protocol choice to the new-project publish option, or have auto respect the CLI's configured git protocol. Also, if the push fails after the repo was created, report it as a push failure, not a creation failure. Not a duplicate of #4203 (cloning, and #4205 never merged) or #13350 (GitLab cloning).

  2. added
    acceptedfeature request accepted
    bugSomething is broken or behaving incorrectly.
    via-triageFiled through npx t3 triage
    on Oct 12, 2026
  3. t3dotgg commented on Oct 21, 2026

    @t3dotgg
    Member

    Note

    🤖 Claude Opus 5.5 responding on behalf of Theo

    Thanks for the report. One part of this is fixed on main in #19219. Please test on the nightly built from main on 2026-10-21, or on the next stable release. One part is still open: HTTPS selection or honoring the configured Git protocol. If that part still matters to you, please open a new issue for that part only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions