{"id":17721813,"url":"https://github.com/sinbad/git-lfs-ssh-serve","last_synced_at":"2025-07-29T10:36:27.995Z","repository":{"id":32925703,"uuid":"36521376","full_name":"sinbad/git-lfs-ssh-serve","owner":"sinbad","description":"Experimental reference implementation of pure SSH server for Git-LFS","archived":false,"fork":false,"pushed_at":"2016-09-14T11:44:47.000Z","size":300,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T17:50:54.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sinbad.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}},"created_at":"2015-05-29T18:15:38.000Z","updated_at":"2022-11-06T17:40:16.000Z","dependencies_parsed_at":"2022-08-02T00:59:28.556Z","dependency_job_id":null,"html_url":"https://github.com/sinbad/git-lfs-ssh-serve","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2Fgit-lfs-ssh-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2Fgit-lfs-ssh-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2Fgit-lfs-ssh-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2Fgit-lfs-ssh-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinbad","download_url":"https://codeload.github.com/sinbad/git-lfs-ssh-serve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532517,"owners_count":20306151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-25T15:36:20.454Z","updated_at":"2025-03-14T05:31:48.282Z","avatar_url":"https://github.com/sinbad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ABANDONED PROJECT\n\nSee closed PR https://github.com/github/git-lfs/pull/378 - this is not being maintained and shouldn't be used by anyone unless we resurrect it somehow in the future. Now just for historical reference. Original README follows...\n\n# The Git-LFS SSH reference server #\n\n`git-lfs-ssh-serve` is a reference implementation of a pure SSH server for \n[git-lfs](https://github.com/github/git-lfs).\n\nWhen using an SSH URL (either ssh://user@host/path or user@host:/path), git-lfs\nwill automatically open an SSH connection to the host specified and run the\ncommand specified by the config parameter ```lfs.sshservercmd```, which if not\nspecified defaults to ```git-lfs-ssh-serve```. Simply copying this program onto your\nserver (no dependencies required, it's stand-alone and works on Windows, Linux\nand Mac servers) and providing authenticated SSH users access to it is enough to\nprovide a reference implementation of a pure SSH LFS server on your own host.\n\n## Installation ##\n\nJust build the binary git-lfs-ssh-serve using 'go build' or cross-compile using\ngox (https://github.com/mitchellh/gox). Install this on your server, on the path\nof any SSH user you need to have access.\n\n## sshd configuration for groups ##\n\nOn many Linux distros, 'ssh url command' uses a default umask of 022 which means\nthat uploaded file permissions are read only except for the user. If you want \npeople to use their own username in their SSH url \u0026 give permission to files via\ngroups, you should edit /etc/pam.d/sshd and add:\n```\n# Setting UMASK for all ssh based connections (ssh, sftp, scp)\n# always allow group perms\nsession    optional     pam_umask.so umask=0002\n```\n\ngit-lfs-ssh-serve will copy the permissions of the base path when creating new files\n\u0026 directories but it can't do that if the umask filters out the write bits. You\ncan't fix this with 'umask' in /etc/profile because that only applies to\ninteractive ssh terminals, not 'ssh url command' forms.\n\n## Invocation ##\n\ngit-lfs will generally handle this, but to invoke the server binary you simply\nneed to run it by name and pass a single 'path' argument. This path is to\nsupport multiple binary stores on the remote server end; you might want to have\na separate binary store for each repo, or for each user, or for each team, or\njust a single path for everything (binaries are immutable so technically can be\nshared between everyone, if permissions aren't an issue).\n\nWhen given an SSH URL for the remote store, git-lfs will simply strip off the\npath element and pass that as an argument to git-lfs-ssh-serve over the SSH\nconnection. It's up to you to use an SSH URL that reflects how you want to\npartition up the remote binary store(s).\n\nExamples:\n\n| URL | Server command |\n|-----|----------------|\n|ssh://steve@bighost.com/goteam/repo1|```git-lfs-ssh-serve goteam/repo1```|\n|git@thehost.com:projects/newproject|```git-lfs-ssh-serve projects/newproject```|\n|ssh://andy@bighost.com//var/shared/rooted/repo|```git-lfs-ssh-serve /var/shared/rooted/repo``` (disallowed by default config)|\n\nRooted paths are disallowed by the default configuration for security, forcing\nall repositories to be under a base path (see below).\n\n## Configuration files ##\n\nConfiguration is via a simple key-value text file placed in the following locations:\n\nWindows:\n\n* %USERPROFILE%\\git-lfs-serve.ini\n* %PROGRAMDATA%\\git-lfs\\git-lfs-serve.ini\n\nLinux/Mac:\n\n* ~/.git-lfs-serve\n* /etc/git-lfs-serve.conf\n\nUsually you'll want to use a global config file to avoid each user having to\nconfigure it themselves, unless you use a generic user name for all connections\nand want to keep the settings there instead of system-wide.\n\n## Configuration settings ##\n\nThere are no grouping levels in the configuration file, it's just a simple name \n= value style.\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n|base-path|The base directory of the binary store. Paths passed as arguments will be evaluated relative to this directory, unless they're intentionally rooted (disallowed by default, see allow-absolute) |None|\n|allow-absolute-paths|Whether to allow absolute paths as arguments, i.e. rooted paths which go outside base-path. Not advisable to enable since can be a security risk.|False|\n|log-file|If set, logging information will be sent to this file.|blank|\n|log-debug|If true, output debug information to log-file|false|\n\n## Dependencies ##\n\n### [Git LFS](https://github.com/github/git-lfs)\nCopyright (c) GitHub, Inc. and Git LFS contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n### [Ginkgo/Gomega](http://onsi.github.io/ginkgo/)\nCopyright (c) 2013-2014 Onsi Fakhouri\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n### [go-homedir](https://github.com/mitchellh/go-homedir)\nCopyright (c) 2013 Mitchell Hashimoto\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinbad%2Fgit-lfs-ssh-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinbad%2Fgit-lfs-ssh-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinbad%2Fgit-lfs-ssh-serve/lists"}