{"id":13861553,"url":"https://github.com/oitofelix/tramp-auto-auth","last_synced_at":"2025-07-14T09:32:24.864Z","repository":{"id":91529916,"uuid":"207179927","full_name":"oitofelix/tramp-auto-auth","owner":"oitofelix","description":"TRAMP automatic authentication library","archived":false,"fork":false,"pushed_at":"2019-10-27T14:20:13.000Z","size":30,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-05T06:03:25.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oitofelix.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}},"created_at":"2019-09-08T22:10:31.000Z","updated_at":"2023-08-25T05:57:20.000Z","dependencies_parsed_at":"2024-04-13T15:17:43.840Z","dependency_job_id":"822f2400-4289-44b3-b037-bb11693e635e","html_url":"https://github.com/oitofelix/tramp-auto-auth","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/oitofelix%2Ftramp-auto-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oitofelix%2Ftramp-auto-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oitofelix%2Ftramp-auto-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oitofelix%2Ftramp-auto-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oitofelix","download_url":"https://codeload.github.com/oitofelix/tramp-auto-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225968840,"owners_count":17553146,"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-08-05T06:01:24.993Z","updated_at":"2024-11-22T21:30:49.221Z","avatar_url":"https://github.com/oitofelix.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# tramp-auto-auth\nTRAMP automatic authentication library\n\nThis library provides `tramp-auto-auth-mode`: a global minor mode\nwhose purpose is to automatically feed TRAMP sub-processes with\npasswords for paths matching regexps.  This is useful in situations\nwhere interactive user input is not desirable or feasible.  For\ninstance, in sub-nets with large number of hosts or whose hosts have\ndynamic IPs assigned to them.  In those cases it’s not practical to\nquery passwords using the `auth-source` library directly, since this\nwould require each host to be listed explicitly and immutably in a\nNetrc file.  Another scenario where this mode is useful are\nnon-interactive Emacs sessions (like those used for batch processing\nor by evaluating `:async` Org Babel source blocks) in which it’s\nimpossible for the user to answer a password-asking prompt.\n\nWhen a TRAMP prompt is encountered, `tramp-auto-auth-mode` queries the\nalist `tramp-auto-auth-alist` for the auth-source spec value whose\nregexp key matches the correspondent TRAMP path.  This spec is then\nused to query the auth-source library for a presumably phony entry\nexclusively dedicated to the whole class of TRAMP paths matching that\nregexp.\n\nTo make use of the automatic authentication feature, on the Lisp side\nthe variable `tramp-auto-auth-alist` must be customized to hold the\npath regexps and their respective auth-source specs, and then\n`tramp-auto-auth-mode` must be enabled.  For example:\n\n#### **`~/.emacs.el`**\n```elisp\n(require 'tramp-auto-auth)\n\n(add-to-list\n 'tramp-auto-auth-alist\n '(\"root@10\\\\.0\\\\.\" .\n   (:host \"Funny-Machines\" :user \"root\" :port \"ssh\")))\n\n(tramp-auto-auth-mode)\n```\n\nAfter this, just put the respective sacred secret in an\nauthentication source supported by auth-source library.  For\ninstance:\n\n#### **`~/.authinfo.gpg`**\n```elisp\nmachine Funny-Machines login root password \"$r00tP#sWD!\" port ssh\n```\n\nIn case you are feeling lazy or the secret is not so secret (nor so\nsacred) -- or for any reason you need to do it all from Lisp --\nit’s enough to:\n\n```elisp\n(auth-source-remember '(:host \"Funny-Machines\" :user \"root\" :port \"ssh\")\n\t\t         '((:secret \"$r00tP#sWD!\")))\n```\n\nAnd happy TRAMPing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foitofelix%2Ftramp-auto-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foitofelix%2Ftramp-auto-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foitofelix%2Ftramp-auto-auth/lists"}