libgit2 / libgit2/libgit2sharp
Repository not being cloned inside a docker container
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ả
Reproduction steps
I currently am deploying a micro-service using .net standard 2.0, which either clones or updates a repo from GitLab.
For this I have a functionality that works perfectly in a Windows environment, but it does not do the trick inside a docker container after I spin it up.
Expected behavior
The repo should be cloned/pulled in a Docker container just like in Windows.
Actual behavior
No repo structure is present inside the linux directory (permissions set to 777). I am also seeing the directory's timestamp being updated when it should do the pull.
Version of LibGit2Sharp (release number or SHA1)
**netstandard2.0**Operating system(s) tested; .NET runtime tested
Working:
Windows 10 Enterprise, 64-bit
Not working:
Linux 828ec2e85f2c 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux
Implementation
if (gitFolder.GetDirectories().Length == 0)
{
try
{
// Get user credentials
Repository.Clone("repository.git", deployerPath, new CloneOptions()
{
BranchName = "develop",
CredentialsProvider = CredentialsProvider(),
});
}
catch (Exception ex)
{
...
}
}
else
{
try
{
var repository = new Repository(deployerPath);
Commands.Pull(repository,
new Signature("blah", "blah@blah.com", DateTimeOffset.Now), new PullOptions()
{
FetchOptions = new FetchOptions() {CredentialsProvider = CredentialsProvider()},
MergeOptions = new MergeOptions() {FailOnConflict = true},
});
}
...
I raised this question in SO (find it here); however, I have not received a response back.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Các điểm vào được báo cáo là Repository.Clone và Commands.Pull trong phần triển khai C# được nêu; trước tiên hãy tái hiện hành vi bằng LibGit2Sharp 0.26.1 trên môi trường Linux Docker được liệt kê và ghi lại ngoại lệ hoặc đầu ra trạng thái. Hoàn thành có nghĩa là xác định lý do repository không tồn tại và ghi lại hoặc triển khai một bản sửa lỗi đã được xác minh, tương thích với container.
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, docker, gitlab
- Lĩnh vực
- devops
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100