Skip to content

Commit 120333e

Browse files
mzagajajhosman
andauthored
Update working-with-the-rubygems-registry.md (github#21922)
Co-authored-by: Jess Hosman <[email protected]>
1 parent 8288b87 commit 120333e

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md

+4-19
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ shortTitle: RubyGems registry
3636
Bundler version 1.13.7
3737
```
3838

39-
- Install keycutter to manage multiple credentials. To install keycutter:
40-
41-
```shell
42-
$ gem install keycutter
43-
```
44-
4539
## Authenticating to {% data variables.product.prodname_registry %}
4640

4741
{% data reusables.package_registry.authenticate-packages %}
@@ -52,7 +46,7 @@ shortTitle: RubyGems registry
5246

5347
{% data reusables.package_registry.required-scopes %}
5448

55-
You can authenticate to {% data variables.product.prodname_registry %} with RubyGems by editing the *~/.gem/credentials* file for publishing gems, editing the *~/.gemrc* file for installing a single gem, or using Bundler for tracking and installing one or more gems.
49+
To publish and install gems, you can configure RubyGems or Bundler to authenticate to {% data variables.product.prodname_registry %} using your {% data variables.product.pat_generic %}.
5650

5751
To publish new gems, you need to authenticate to {% data variables.product.prodname_registry %} with RubyGems by editing your *~/.gem/credentials* file to include your {% data variables.product.pat_v1 %}. Create a new *~/.gem/credentials* file if this file doesn't exist.
5852

@@ -63,7 +57,7 @@ For example, you would create or edit a *~/.gem/credentials* to include the foll
6357
:github: Bearer TOKEN
6458
```
6559

66-
To install gems, you need to authenticate to {% data variables.product.prodname_registry %} by editing the *~/.gemrc* file for your project to include `https://USERNAME:TOKEN@{% ifversion fpt or ghec %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/`. You must replace:
60+
To install gems, you need to authenticate to {% data variables.product.prodname_registry %} by updating your gem sources to include `https://USERNAME:TOKEN@{% ifversion fpt or ghec %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/`. You must replace:
6761
- `USERNAME` with your {% data variables.product.prodname_dotcom %} username.
6862
- `TOKEN` with your {% data variables.product.pat_v1 %}.
6963
- `OWNER` with the name of the user or organization account that owns the repository containing your project.{% ifversion ghes %}
@@ -72,18 +66,9 @@ To install gems, you need to authenticate to {% data variables.product.prodname_
7266
- `REGISTRY-URL` with the URL for your instance's Rubygems registry, `rubygems.HOSTNAME`. Replace *HOSTNAME* with the hostname of {% data variables.location.product_location %}.
7367
{% endif %}
7468

75-
If you don't have a *~/.gemrc* file, create a new *~/.gemrc* file using this example.
76-
69+
If you would like your package to be available globally, you can run the following command to add your registry as a source.
7770
```shell
78-
---
79-
:backtrace: false
80-
:bulk_threshold: 1000
81-
:sources:
82-
- https://rubygems.org/
83-
- https://USERNAME:TOKEN@{% ifversion fpt or ghec %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/
84-
:update_sources: true
85-
:verbose: true
86-
71+
gem sources --add https://USERNAME:TOKEN@{% ifversion fpt or ghec %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/
8772
```
8873

8974
To authenticate with Bundler, configure Bundler to use your {% data variables.product.pat_v1 %}, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, *TOKEN* with your {% data variables.product.pat_generic %}, and *OWNER* with the name of the user or organization account that owns the repository containing your project.{% ifversion ghes %} Replace `REGISTRY-URL` with the URL for your instance's RubyGems registry. If your instance has subdomain isolation enabled, use `rubygems.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/rubygems`. In either case, replace *HOSTNAME* with the hostname of your {% data variables.product.prodname_ghe_server %} instance.{% elsif ghae %}Replace `REGISTRY-URL` with the URL for your instance's Rubygems registry, `rubygems.HOSTNAME`. Replace *HOSTNAME* with the hostname of {% data variables.location.product_location %}.{% endif %}

0 commit comments

Comments
 (0)