Title: Running from Native AOT app fails to build signature · Issue #2187 · libgit2/libgit2sharp · GitHub
Open Graph Title: Running from Native AOT app fails to build signature · Issue #2187 · libgit2/libgit2sharp
X Title: Running from Native AOT app fails to build signature · Issue #2187 · libgit2/libgit2sharp
Description: This is a clean repro: #:package LibGit2Sharp@0.* #:package Spectre.Console@0.* using System; using LibGit2Sharp; using Spectre.Console; using var repo = new Repository(Environment.CurrentDirectory); var signature = repo.Config.BuildSign...
Open Graph Description: This is a clean repro: #:package LibGit2Sharp@0.* #:package Spectre.Console@0.* using System; using LibGit2Sharp; using Spectre.Console; using var repo = new Repository(Environment.CurrentDirectory...
X Description: This is a clean repro: #:package LibGit2Sharp@0.* #:package Spectre.Console@0.* using System; using LibGit2Sharp; using Spectre.Console; using var repo = new Repository(Environment.CurrentDirectory...
Opengraph URL: https://github.com/libgit2/libgit2sharp/issues/2187
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Running from Native AOT app fails to build signature","articleBody":"This is a clean repro:\n\n```csharp\n#:package LibGit2Sharp@0.*\n#:package Spectre.Console@0.*\nusing System;\nusing LibGit2Sharp;\nusing Spectre.Console;\n\nusing var repo = new Repository(Environment.CurrentDirectory);\nvar signature = repo.Config.BuildSignature(DateTimeOffset.Now);\n\nif (signature == null)\n{\n AnsiConsole.MarkupLine(\"[red] Unexpected error: Git user.name and/or user.email are not configured.[/]\");\n return 1;\n}\nelse\n{\n AnsiConsole.MarkupLine($\"[lime]{signature}[/]\");\n return 0;\n}\n```\n\nWhen running this script from a git repo dir with `dotnet run --file repro.cs`, you get the proper signature built from the found config.\n\nDoing `dotnet publish repro.cs` and then running it from `artifacts\\repro\\repro.exe` will result in the error path consistently.\n\nThe PR #2188 fixes it and can be verified by changing the above repro script to use my CI feed:\n\n```csharp\n#:package LibGit2Sharp@0.31.1\n#:package Spectre.Console@0.*\n#:property RestoreSources=https://api.nuget.org/v3/index.json;https://pkg.kzu.app/index.json\n```","author":{"url":"https://github.com/kzu","@type":"Person","name":"kzu"},"datePublished":"2026-07-22T02:13:43Z","url":"https://github.com/libgit2/libgit2sharp/issues/2187"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b743ac8-9d34-8fe6-8065-530e15a9b655 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A154:18B2E:1A6921:23CA0B:6AFD4EBB |
| html-safe-nonce | e558812d647213aefe76411feef55427a69980ee34db6817e4d7f6a60bdb2bed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTU0OjE4QjJFOjFBNjkyMToyM0NBMEI6NkFGRDRFQkIiLCJ2aXNpdG9yX2lkIjoiMzk3OTYwOTU5NzkzOTA5NDM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f363bf24c5199eac67126a2960b2c06f95c12db860457ddd12898058a84eb84a |
| hovercard-subject-tag | issue:4944719376 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2sharp/2187/issue_layout |
| twitter:image | https://opengraph.githubassets.com/378d0243a907ac79420c7271c1d49fbecc116101ba50c08d69653d641d43c0bc/libgit2/libgit2sharp/issues/2187 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/378d0243a907ac79420c7271c1d49fbecc116101ba50c08d69653d641d43c0bc/libgit2/libgit2sharp/issues/2187 |
| og:image:alt | This is a clean repro: #:package LibGit2Sharp@0.* #:package Spectre.Console@0.* using System; using LibGit2Sharp; using Spectre.Console; using var repo = new Repository(Environment.CurrentDirectory... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kzu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/libgit2/libgit2sharp git https://github.com/libgit2/libgit2sharp.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 1415168 |
| octolytics-dimension-repository_nwo | libgit2/libgit2sharp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1415168 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2sharp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width