Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Repository.Init and Repository.Clone fail with path too long

Open
#2,051 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the failure through the Repository.Init and Repository.Clone entry points on Windows 10 with core.longpaths enabled and a path longer than 260 characters. Compare the expected successful operation with the LibGit2Sharp.Exception, then verify that both entry points work under .NET 4.8 without the path-too-long error.

Written by the indexing model from the issue text.

Description

Reproduction steps

Set core.longpaths = true in global or user
Use either Repository.Init or Repository.Clone on a path which is longer than 260

Expected behavior

Init and Clone work without an error

Actual behavior

LibGit2Sharp.Exception (path too long)

Version of LibGit2Sharp (release number or SHA1)

0.27.2

Operating system(s) tested; .NET runtime tested

Win 10 22H2 (.NET 4.8)

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

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.

More from libgit2/libgit2sharp

All issues in libgit2/libgit2sharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.