{"id":19650920,"url":"https://github.com/haevg-rz/git-file-downloader","last_synced_at":"2026-01-12T01:46:58.240Z","repository":{"id":44899898,"uuid":"202502715","full_name":"haevg-rz/git-file-downloader","owner":"haevg-rz","description":"Keep files and folder in sync with a GitLab repo","archived":false,"fork":false,"pushed_at":"2025-02-17T13:38:03.000Z","size":554,"stargazers_count":3,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-24T09:50:35.799Z","etag":null,"topics":["admin","git","gitlab","golang","sync"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haevg-rz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-15T08:21:48.000Z","updated_at":"2025-01-12T20:17:18.000Z","dependencies_parsed_at":"2025-02-17T14:27:50.474Z","dependency_job_id":"301572fc-788e-4d82-980e-1c61cf1dadaa","html_url":"https://github.com/haevg-rz/git-file-downloader","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/haevg-rz/git-file-downloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haevg-rz%2Fgit-file-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haevg-rz%2Fgit-file-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haevg-rz%2Fgit-file-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haevg-rz%2Fgit-file-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haevg-rz","download_url":"https://codeload.github.com/haevg-rz/git-file-downloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haevg-rz%2Fgit-file-downloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","git","gitlab","golang","sync"],"created_at":"2024-11-11T15:03:57.148Z","updated_at":"2026-01-12T01:46:58.223Z","avatar_url":"https://github.com/haevg-rz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git File Downloader (gdown)\n\n![Go](https://github.com/haevg-rz/git-file-downloader/workflows/Go/badge.svg)\n[![codecov](https://codecov.io/gh/haevg-rz/git-file-downloader/branch/master/graph/badge.svg)](https://codecov.io/gh/haevg-rz/git-file-downloader)\n[![Go Report Card](https://goreportcard.com/badge/github.com/haevg-rz/git-file-downloader)](https://goreportcard.com/report/github.com/haevg-rz/git-file-downloader)\n\nDownload a file from a git hosting service and save it to disk if file is different, to ensure that the configuration files (or other files) on your servers are always up to date.\n\n## Latest\n\nSee Releases\n\n## Using\n\n```plain\ngdown.exe -h\n2020/01/30 20:49:44 GitLab File Downloader Version: 2.0.2\n2020/01/30 20:49:44 Project: https://github.com/haevg-rz/git-file-downloader/\nUsage of gdown.exe:\n  -branch string\n        Branch (default \"main\")\n  -exclude string\n        Exclude these regex pattern\n  -includeonly string\n        Include only these regex pattern\n  -outFolder string\n        Folder to write file to disk\n  -outPath string\n        Path to write file to disk\n  -projectNumber int\n        The Project ID from your project\n  -repoFilePath string\n        File path in repo, like src/main.go\n  -repoFolder string\n        Folder to write file to disk\n  -token string\n        Private-Token with access right for \"api\" and \"read_repository\", role must be minimum \"Reporter\"\n  -url string\n        Url to Api v4, like https://my-git-lab-server.local/api/v4/\n```\n\n## Use Case\n\n### Download file from your gitlab repository\n\nYou want to have the benefits from git to manage your config files.\nWith this (windows and linux) tool you can now download theses config files from an on-promise GitLab instance and save them to disk.\n\nThe file will be **only** replaced if the hash is different (from disk to git).\n\n**Working example!**\n\nSee https://gitlab.com/gdown/test-project for file.\n\n```bat\ngdown.exe -outPath settings.json -projectNumber 16447351 -repoFilePath settings.json -token 5BUJpxdVx9fyq5KrXJx6 -url https://gitlab.com/api/v4/\n```\n\n```log\n2022/01/19 21:16:18 GitLab File Downloader Version: undef Commit: undef\n2022/01/19 21:16:18 Project: https://github.com/haevg-rz/git-file-downloader/\n2022/01/19 21:16:18 Mode: File\n2022/01/19 21:16:18 Wrote file: settings.json , because is new or changed\n```\n\n### Download folder from your gitlab repository\n\n**Working example!**\n\nSee https://gitlab.com/gdown/test-project for folder structure.\n\n```bat\ngdown.exe -outFolder my_local_dir -projectNumber 16447351 -repoFolder test_dir -token 5BUJpxdVx9fyq5KrXJx6 -url https://gitlab.com/api/v4/ -exclude .gitkeep\n```\n\n```log\n2022/01/19 21:14:05 GitLab File Downloader Version: undef Commit: undef\n2022/01/19 21:14:05 Project: https://github.com/haevg-rz/git-file-downloader/\n2022/01/19 21:14:05 Mode: Folder\n2022/01/19 21:14:06 Sync 5 files, from remote folder test_dir\n2022/01/19 21:14:06 Sync 4 files, from remote folder test_dir/test_space_special +ä$\n2022/01/19 21:14:06 Sync 2 files, from remote folder test_dir/test_space_special +ä$/deep\n2022/01/19 21:14:07 Sync 1 files, from remote folder test_dir/test_space_special +ä$/deep/deep in deep\n2022/01/19 21:14:07 Wrote file: test_dir/test_space_special +ä$/deep/deep in deep/another deep file , because is new or changed\n2022/01/19 21:14:08 Wrote file: test_dir/test_space_special +ä$/deep/deep_file , because is new or changed\n2022/01/19 21:14:08 Wrote file: test_dir/test_space_special +ä$/test#1.txt , because is new or changed\n2022/01/19 21:14:08 Wrote file: test_dir/test_space_special +ä$/test#2 #.txt , because is new or changed\n2022/01/19 21:14:09 Wrote file: test_dir/test_space_special +ä$/test#3 äöü.bin , because is new or changed\n2022/01/19 21:14:09 Skip: .gitkeep because exclude rule: .gitkeep\n2022/01/19 21:14:09 Wrote file: test_dir/file1.txt , because is new or changed\n2022/01/19 21:14:09 Wrote file: test_dir/file2.txt , because is new or changed\n2022/01/19 21:14:10 Wrote file: test_dir/file_space[ ].txt , because is new or changed\n```\n\n## Contributing\n\n- Github Copilot [.github/copilot-instructions.md](.github/copilot-instructions.md)\n\n## Technical\n\n### Scopes for personal access tokens\n\n- `read_repository`: Allows read-access to the repository files.\n- `api`: Allows read-write access to the repository files.\n\n### TLS Security\n\n**Will be a config switch, soon.**\n\n```go\ntr := \u0026http.Transport{\n      TLSClientConfig: \u0026tls.Config{InsecureSkipVerify: true},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaevg-rz%2Fgit-file-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaevg-rz%2Fgit-file-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaevg-rz%2Fgit-file-downloader/lists"}