I am encountering an issue when attempting to publish a repository from VSCode to GitHub on my Windows 10 machine. Specifically, I am unable to trigger the ‘Publish to GitHub’ prompt, regardless of the method I follow. Despite my GitHub account being connected, the expected dialog box to choose between a private or public repository never appears.
Here’s what I’ve tried so far:
- Method 1:
Using Source Control
>Publish to GitHub
- Method 2:
Initialize Repository
>Stage Changes
>Commit
>Publish Branch
Upon clicking on Publish to GitHub
or Publish Branch
I would expect a window with the messages “Publish to GitHub private/public repository”, but nothing comes up.
I work in an environment with elevated network security, and I suspect this may contribute to the issue. Here are some additional details:
- I faced the same issue on both my Mac and Windows 10 machines when I was connected to the network (have not tested it outside the network).
- I fixed the issue on my Mac by downloading the “Mac CA VSCode” extension.
- On my Windows machine, I tried downloading the “win-ca” extension, but this didn’t resolve the problem.
My GitHub account is already connected to VSCode. When I follow the “Initialize Repository
> Stage Changes
> Commit
> Publish Branch
” path, I am able to Commit and on the Source Control Graph window I can see my commit message and my GitHub username:
source control graph
Lastly, on the welcome page of VSCode, when I click on Clone Git Repository
>Clone from GitHub
I get the message Error: fetch failed
I am not sure if the following will be helpful. When I initiate VSCode I get the following output:
2024-09-24 11:52:35.080 [info] [main] Log level: Info
2024-09-24 11:52:35.081 [info] [main] Validating found git in: "C:Program FilesGitcmdgit.exe"
2024-09-24 11:52:35.122 [info] [main] Using git "2.46.1.windows.1" from "C:Program FilesGitcmdgit.exe"
2024-09-24 11:52:35.122 [info] [Model][doInitialScan] Initial repository scan started
2024-09-24 11:52:35.414 [info] > git rev-parse --show-toplevel [272ms]
2024-09-24 11:52:35.414 [info] fatal: not a git repository (or any of the parent directories): .git
2024-09-24 11:52:35.415 [info] [Model][doInitialScan] Initial repository scan completed - repositories (0), closed repositories (0), parent repositories (0), unsafe repositories (0)
2024-09-24 11:52:35.995 [info] > git rev-parse --show-toplevel [70ms]
2024-09-24 11:52:36.003 [info] fatal: not a git repository (or any of the parent directories): .git
And when I follow the Initialize Repository bath the output is the following:
2024-09-24 11:52:35.415 [info] [Model][doInitialScan] Initial repository scan completed - repositories (0), closed repositories (0), parent repositories (0), unsafe repositories (0)
2024-09-24 11:52:35.995 [info] > git rev-parse --show-toplevel [70ms]
2024-09-24 11:52:36.003 [info] fatal: not a git repository (or any of the parent directories): .git
2024-09-24 11:55:24.130 [info] > git init -b main [466ms]
2024-09-24 11:55:24.212 [info] > git rev-parse --show-toplevel [67ms]
2024-09-24 11:55:24.293 [info] > git rev-parse --git-dir --git-common-dir [63ms]
2024-09-24 11:55:24.322 [info] [Model][openRepository] Opened repository: p:pathtotesting
2024-09-24 11:55:24.371 [info] [Git][getRemotes] No remotes found in the git config file
2024-09-24 11:55:24.425 [info] > git config --get commit.template [84ms]
2024-09-24 11:55:24.467 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [78ms]
2024-09-24 11:55:24.467 [warning] [Git][getBranch] No such branch: main
2024-09-24 11:55:24.484 [info] > git fetch [170ms]
2024-09-24 11:55:24.503 [info] > git status -z -uall [21ms] (cancelled)
2024-09-24 11:55:24.557 [info] [Git][getRemotes] No remotes found in the git config file
2024-09-24 11:55:24.557 [info] [Git][getRemotes] No remotes found in the git config file
2024-09-24 11:55:24.581 [info] > git config --get commit.template [79ms]
2024-09-24 11:55:24.594 [info] > git config --get commit.template [76ms]
2024-09-24 11:55:24.615 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [74ms]
2024-09-24 11:55:24.615 [warning] [Git][getBranch] No such branch: main
2024-09-24 11:55:24.630 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [74ms]
2024-09-24 11:55:24.630 [warning] [Git][getBranch] No such branch: main
2024-09-24 11:55:24.712 [info] > git status -z -uall [82ms]
2024-09-24 11:55:24.804 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [76ms]
2024-09-24 11:55:24.804 [warning] [Git][getBranch] No such branch: main
2024-09-24 11:55:24.830 [info] > git config --local branch.main.github-pr-owner-number [77ms]
2024-09-24 11:55:24.830 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:24.905 [info] > git config --local branch.main.remote [60ms]
2024-09-24 11:55:24.905 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:24.982 [info] > git config --local branch.main.merge [62ms]
2024-09-24 11:55:24.982 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:25.424 [info] > git check-ignore -v -z --stdin [70ms]
2024-09-24 11:55:34.663 [info] > git add -A -- P:pathtotestingREADME.md [210ms]
2024-09-24 11:55:34.698 [info] [Git][getRemotes] No remotes found in the git config file
2024-09-24 11:55:34.752 [info] > git config --get commit.template [72ms]
2024-09-24 11:55:34.770 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [72ms]
2024-09-24 11:55:34.770 [warning] [Git][getBranch] No such branch: main
2024-09-24 11:55:34.865 [info] > git status -z -uall [79ms]
2024-09-24 11:55:34.942 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [61ms]
2024-09-24 11:55:34.942 [warning] [Git][getBranch] No such branch: main
2024-09-24 11:55:41.726 [info] > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - --allow-empty-message [394ms]
2024-09-24 11:55:41.807 [info] > git config --get commit.template [64ms]
2024-09-24 11:55:41.841 [info] [Git][getRemotes] No remotes found in the git config file
2024-09-24 11:55:41.894 [info] > git config --get commit.template [70ms]
2024-09-24 11:55:41.917 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [77ms]
2024-09-24 11:55:42.019 [info] > git status -z -uall [86ms]
2024-09-24 11:55:42.072 [info] [Git][getRemotes] No remotes found in the git config file
2024-09-24 11:55:42.107 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [73ms]
2024-09-24 11:55:42.124 [info] > git config --local branch.main.github-pr-owner-number [71ms]
2024-09-24 11:55:42.124 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:42.153 [info] > git config --get commit.template [83ms]
2024-09-24 11:55:42.175 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [85ms]
2024-09-24 11:55:42.193 [info] > git config --local branch.main.vscode-merge-base [70ms]
2024-09-24 11:55:42.193 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:42.208 [info] > git config --local branch.main.remote [62ms]
2024-09-24 11:55:42.208 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:42.273 [info] > git status -z -uall [84ms]
2024-09-24 11:55:42.288 [info] > git config --local branch.main.merge [65ms]
2024-09-24 11:55:42.289 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:42.289 [info] > git reflog main --grep-reflog=branch: Created from *. [82ms]
2024-09-24 11:55:42.358 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [71ms]
2024-09-24 11:55:42.373 [info] > git symbolic-ref --short refs/remotes/origin/HEAD [70ms]
2024-09-24 11:55:42.373 [info] fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
2024-09-24 11:55:42.434 [info] > git config --local branch.main.vscode-merge-base [62ms]
2024-09-24 11:55:42.435 [warning] [Git][config] git config failed: Failed to execute git
2024-09-24 11:55:42.471 [info] > git log --format=%H%n%aN%n%aE%n%at%n%ct%n%P%n%D%n%B -z --shortstat --diff-merges=first-parent -n50 --skip=0 --topo-order --decorate=full aac66621e6fba9b83b5ac5ae71a2db9fdc4df494 [81ms]
2024-09-24 11:55:42.520 [info] > git reflog main --grep-reflog=branch: Created from *. [71ms]
2024-09-24 11:55:42.598 [info] > git symbolic-ref --short refs/remotes/origin/HEAD [62ms]
2024-09-24 11:55:42.598 [info] fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
I appreciate your time and help!
MariosGvr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I was able to fix it by clicking Manage
> Extention Settings
in the win-ca extension and changing replace
to append
…
MariosGvr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.