libgit2 / libgit2/libgit2sharp

"invalid version 0 on git_proxy_options" thrown when natives are built from source

Đang mở
#2,161 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
C#
Star
3.5k
Fork
925
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi, I'm currently trying to make a custom build that uses libssh2 instead of exec for SSH, since I don't want OpenSSH windows to spawn as my program makes requests. I changed this flag, then followed through the rest of the compilation steps both for native binaries and lg2s.

I then tried pulling, not on a proxy, using this code:

var fOptions = new FetchOptions ();
fOptions.Prune = UpdaterMod.settings.pruneOld;

var mOptions = new MergeOptions ();
mOptions.CommitOnSuccess = true;
mOptions.FileConflictStrategy = UpdaterMod.settings.onFileConflict;

var sig = new Signature (new Identity (modName, email), DateTimeOffset.Now);

try {
    string logHolder = "";
    Commands.Fetch (repo, remote.Name, refSpecs, fOptions, logHolder);

    if (logHolder.Length > 0)
        LogMsg (logHolder, LogMode.Warn);
}
catch (Exception e) {
    LogMsg ($"Could not fetch data from remote repo: {e.Message}", LogMode.Error);
    return;
}

Expected behavior

The program should attempt to pull without trying to use a proxy.

Actual behavior

The caught exception contains the message in the title.

System information

Windows 10 10.0.19045

AMD Ryzen 5 3600

Other useful information

This issue persists when the flag is switched back to exec

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ lệnh gọi Commands.Fetch với FetchOptions trên bản build Windows được báo cáo, sau đó theo dõi cách bản build native xử lý các tùy chọn proxy và việc xác thực phiên bản. Tái hiện fetch với các cấu hình custom và exec; hoàn tất khi một fetch không qua proxy không còn ném ra exception phiên bản không hợp lệ đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, git
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.