libgit2 / libgit2/libgit2sharp

Push produce no errors but is not working if the local repo has .github folder

Open
#2,150 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

Summary

When using libgit2sharp to push an initial commit that includes a .github folder (with valid contents), the push fails silently — no error is thrown, and the remote is not updated. If the folder is renamed (e.g., to github), the push succeeds.

Steps to Reproduce
  1. Create a new local repo
  2. Add a .github/workflows/ci.yml file
  3. Commit
  4. Attempt to push to a GitHub remote (with or without authentication)
Observed Behavior
  • repo.Network.Push(...) does not throw
  • Remote is unchanged
  • If .github is renamed, push succeeds as expected
Expected Behavior

Push should either:

  • Succeed and update the remote, or
  • Throw an exception if push fails
Notes
  • Using latest LibGit2Sharp and .NET 6+
  • Changing .github to any other folder name works
Environment
  • LibGit2Sharp version: 0.31.0
  • OS: Windows

Contributor guide

Open the contributing guide

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

Reproduce the issue with a new repository containing .github/workflows/ci.yml, then trace the behavior of repo.Network.Push(...) against a GitHub remote. Confirm whether the push updates the remote or reports an exception, and verify that renaming .github changes the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.