{"id":14067937,"url":"https://github.com/r-lib/credentials","last_synced_at":"2025-04-02T14:05:15.043Z","repository":{"id":34294126,"uuid":"156437702","full_name":"r-lib/credentials","owner":"r-lib","description":"Tools for Managing SSH and Git Credentials","archived":false,"fork":false,"pushed_at":"2024-10-03T18:19:02.000Z","size":293,"stargazers_count":72,"open_issues_count":11,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T15:25:36.268Z","etag":null,"topics":["git","password","r","rstats","ssh"],"latest_commit_sha":null,"homepage":"https://docs.ropensci.org/credentials","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-lib.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","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}},"created_at":"2018-11-06T19:40:03.000Z","updated_at":"2024-10-03T18:19:05.000Z","dependencies_parsed_at":"2024-11-09T21:08:31.629Z","dependency_job_id":"f572c7fe-b87a-4b1b-bfae-999af64e2a5b","html_url":"https://github.com/r-lib/credentials","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcredentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcredentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcredentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcredentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/credentials/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246797431,"owners_count":20835572,"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":["git","password","r","rstats","ssh"],"created_at":"2024-08-13T07:05:51.349Z","updated_at":"2025-04-02T14:05:15.027Z","avatar_url":"https://github.com/r-lib.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# credentials \u003cimg src=\"man/figures/logo.png\" align=\"right\" alt=\"logo\" width=\"120\" height = \"139\" style = \"border: none; float: right;\"\u003e\n\n*This package is a joint effort from [rOpenSci](https://ropensci.org/) and the [Tidyverse](https://www.tidyverse.org/) team.*\n\n\u003e Tools for Managing SSH and Git Credentials\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/r-lib/credentials?branch=master\u0026svg=true)](https://ci.appveyor.com/project/jeroen/credentials)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/credentials)](http://cran.r-project.org/package=credentials)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/credentials)](http://cran.r-project.org/web/packages/credentials/index.html)\n\n\nSetup and retrieve HTTPS and SSH credentials for use with 'git' and \nother services. For HTTPS remotes the package interfaces the 'git-credential' \nutility which 'git' uses to store HTTP usernames and passwords. For SSH \nremotes we provide convenient functions to find or generate appropriate SSH \nkeys. The package both helps the user to setup a local git installation, and\nalso provides a back-end for git/ssh client libraries to authenticate with \nexisting user credentials.\n\n### Setting your GITHUB_PAT\n\nAutomatically populate your `GITHUB_PAT` environment variable from the native git credential store. The credential manager will safely prompt the user for credentials when needed.\n\n```r\ncredentials::set_github_pat()\n```\n\nUse this function in your `.Rprofile` if you want to automatically set `GITHUB_PAT` for each R session, without hardcoding your secret in plain text.\n\n### Manage HTTPS credentials\n\nLoad or prompt the user for GitHub username and password:\n\n```r\nlibrary(credentials)\ngit_credential_ask('https://github.com')\n```\n\nSee which credential helper back-end your `git-credential` store is using:\n\n```r\ncredentials::credential_helper_get()\n```\n\n### Manage SSH keys\n\nLookup the appropriate key, or prompt the user to generate one:\n\n```r\nlibrary(credentials)\nssh_key_info()\n```\n\nYou can copy-paste the public key directly to your [GitHub profile](https://github.com/settings/ssh/new)!\n\n## For developers\n\nUse the openssl package to read the user private key in R for encryption / signatures: \n\n```r\nuser \u003c- ssh_key_info()\nkey \u003c- ssh_read_key(user$key)\nopenssl::write_pem(key)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fcredentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Fcredentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fcredentials/lists"}