LibGit2Sharp.LibGit2SharpException: request failed with status code: 502

未關閉
#1,619 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
csharp, git
領域
devtools

研究方向

從顯示的 Repository.Network.Push 呼叫及其 PushOptions 開始,接著比較在 1.5GB repository 上使用 LibGit2Sharp 進行 push 與透過終端機進行 push 的結果。檢查是否能使用 LibGit2Sharp 1.0.235 重現 502;完成的標準是找出程式庫或遠端端的原因,並記錄下一步操作。

由索引模型根據 Issue 內容生成。

描述

I have a repo that i am trying to push to remote, The repo is about 1.5GB, I am able to push from the terminal. I am able to initialize and push a repo using the following code.
I am thrown the following error LibGit2Sharp.LibGit2SharpException: request failed with status code: 502

var destRepoPath = @"D:\DP\T\Test85";
var stageOptionsWithIncludeIgnore = new StageOptions { IncludeIgnored = true };

using (var repo = new Repository(destRepoPath))
{
Commands.Stage(repo, "*", stageOptionsWithIncludeIgnore);
var origin = repo.Network.Remotes["origin"];
var pushRefSpec = "refs/heads/master";
repo.Network.Push(origin, pushRefSpec,
new PushOptions
{
CredentialsProvider = (url, user, cred) => new UsernamePasswordCredentials { Username = "Username", Password = "Password" }
});
}

Version of LibGit2Sharp: 1.0.235

I use VS 2017 and C# 4.5
Appreciate any help, thanks

主要語言
C#
星號
3.5k
分支
925
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

libgit2/libgit2sharp 的其他 Issue

查看 libgit2/libgit2sharp 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。