{"id":17933601,"url":"https://github.com/matrix86/gitctx","last_synced_at":"2025-09-22T07:31:48.075Z","repository":{"id":61627194,"uuid":"545144609","full_name":"Matrix86/gitctx","owner":"Matrix86","description":"gitctx is a tool that allows you to switch from a GitHub account to another in a fast way","archived":false,"fork":false,"pushed_at":"2023-12-19T22:16:10.000Z","size":52,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T22:05:27.153Z","etag":null,"topics":["account","github","golang","multiple","shell","tool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Matrix86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-10-03T21:29:52.000Z","updated_at":"2023-04-18T13:52:46.000Z","dependencies_parsed_at":"2024-06-20T14:02:30.833Z","dependency_job_id":"8ed6d820-4621-4133-b726-2e626e0a23c9","html_url":"https://github.com/Matrix86/gitctx","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/Matrix86%2Fgitctx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matrix86%2Fgitctx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matrix86%2Fgitctx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matrix86%2Fgitctx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Matrix86","download_url":"https://codeload.github.com/Matrix86/gitctx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233832510,"owners_count":18737210,"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":["account","github","golang","multiple","shell","tool"],"created_at":"2024-10-28T21:40:52.922Z","updated_at":"2025-09-22T07:31:42.806Z","avatar_url":"https://github.com/Matrix86.png","language":"Go","readme":"# gitctx: use multiple GitHub's SSH accounts without headaches\n\nThis repository contains `gitctx` tool. \n\n## What's `gitctx`?\n\n**gitctx** is a tool that allows you to switch from a GitHub account to another in a fast way.\nCurrently the only way to support multiple accounts on Github is to add to the ~/.ssh/config file multiple Hosts (check [here](https://gist.github.com/rahularity/86da20fe3858e6b311de068201d279e3) or use the `.gitconfig` file with the **includeIf** directive [here](https://blog.gitguardian.com/8-easy-steps-to-set-up-multiple-git-accounts/)).\n\nUsing this tool you can switch from an account (referred as context) to another just like in the example:\n\n![demo](img/demo.gif)\n\n## Help\n\n```\nUsage:\n  gitctx [OPTIONS]\n\nApplication Options:\n      --add        Create a new host in the selected config file.\n      --rm=        Remove an existing host in the selected config file.\n      --edit=      Edit an existing host in the selected config file.\n  -s, --sshconfig= Set the path of the config (default: ~/.ssh/config).\n      --hostname=  Set the hostname to use for context change (default: github.com).\n      --config=    Set the path of the gitctx folder (default: ~/.gitctx).\n\nHelp Options:\n  -h, --help       Show this help message\n```\n\n## Installation\n\n\u003e $ go install github.com/Matrix86/gitctx/cmd/gitctx@latest\n\n### From sources\n\n\u003e $ git clone git@github.com:Matrix86/gitctx.git\n\n\u003e $ cd gitctx\n\n\u003e $ make install\n\n## Completion\n\nTo enable the shell completion, you need to move add the following line to the end of the `~/.bashrc` file:\n\n\u003e . $HOME/.gitctx/gitctx.bash\n\n## Git configuration\n\nIt is possible to define some GIT configs that should be called when you switch from a context to another. \nIn order to define them you can manually add them in the configuration file (stored on `~/.gitctx/config.yml` as default) as in the following example:\n\n```\ngit_settings:\n    username: \u003c-- it has to be the same used in the `hosts` field\n        user.name: MyName\n        user.email: something@me.me\n        user.signingkey: /home/ubuntu/.ssh/id_rsa.pub\n        commit.gpgsign: true\n        gpg.format: ssh\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix86%2Fgitctx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrix86%2Fgitctx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix86%2Fgitctx/lists"}