You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md
+4-19
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,6 @@ shortTitle: RubyGems registry
36
36
Bundler version 1.13.7
37
37
```
38
38
39
-
- Install keycutter to manage multiple credentials. To install keycutter:
40
-
41
-
```shell
42
-
$ gem install keycutter
43
-
```
44
-
45
39
## Authenticating to {% data variables.product.prodname_registry %}
46
40
47
41
{% data reusables.package_registry.authenticate-packages %}
@@ -52,7 +46,7 @@ shortTitle: RubyGems registry
52
46
53
47
{% data reusables.package_registry.required-scopes %}
54
48
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 %}.
56
50
57
51
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.
58
52
@@ -63,7 +57,7 @@ For example, you would create or edit a *~/.gem/credentials* to include the foll
63
57
:github: Bearer TOKEN
64
58
```
65
59
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:
67
61
-`USERNAME` with your {% data variables.product.prodname_dotcom %} username.
68
62
-`TOKEN` with your {% data variables.product.pat_v1 %}.
69
63
-`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_
72
66
-`REGISTRY-URL` with the URL for your instance's Rubygems registry, `rubygems.HOSTNAME`. Replace *HOSTNAME* with the hostname of {% data variables.location.product_location %}.
73
67
{% endif %}
74
68
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.
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