# How to configure Private Google Container Registry with Nexus as Proxy

**URL:** <https://community.sonatype.com/t/how-to-configure-private-google-container-registry-with-nexus-as-proxy/3331>\
**Category:** Sonatype Nexus Repository\
**Created:** [January 21, 2020, 11:18am UTC](https://community.sonatype.com/t/how-to-configure-private-google-container-registry-with-nexus-as-proxy/3331 "2020-01-21T11:18:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.kuzak](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/michal.kuzak/32/1000_2.png) [@michal.kuzak](https://community.sonatype.com/u/michal.kuzak)\
**Post date:** [January 21, 2020, 11:18am UTC](https://community.sonatype.com/t/how-to-configure-private-google-container-registry-with-nexus-as-proxy/3331/1 "2020-01-21T11:18:58Z")

</div>

Hi All,

I have Nexus OSS 3.16 on prem and would like to configure it to proxy a Private Google Container Registry into Nexus. I have a google service account and the key. now how do I configure the authentication bit in nexus to link to gcr ?

tried putting the username as \_json\_key​ and the password the content of the Google JSON Key File but no banana …

Any advice or ideas ?

---

<div class="post-metadata">

**Author:** ![andres](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/andres/32/201_2.png) [@andres](https://community.sonatype.com/u/andres)\
**Post date:** [January 21, 2020, 3:39pm UTC](https://community.sonatype.com/t/how-to-configure-private-google-container-registry-with-nexus-as-proxy/3331/2 "2020-01-21T15:39:41Z")

</div>

Welcome to the Community, Mike!

**Upgrading your version of Nexus Repository Manager**  
Unfortunately, there was a bug in versions of Nexus Repository Manager prior to 3.19 which prevented the feature I am about to mention from working. [What Happened To issues.sonatype.org? - Documentation](https://issues.sonatype.org/browse/NEXUS-19102)  
So, your first step will be to upgrade your instance of Nexus RM: [Install Self-Hosted Nexus Repository](https://help.sonatype.com/repomanager3/upgrading#Upgrading-Upgradingfrom3.xto3.y)

**How to configure**  
Once you have an updated version of NXRM, the setting you are looking for when configuring your repository is the HTTP Authentication section for that repository’s configuration. This is where you want to set your service account’s username - `oauth2accesstoken` according to [this page](https://cloud.google.com/container-registry/docs/advanced-authentication) - and its token as the password.

 ![11](https://canada1.discourse-cdn.com/flex047/uploads/communitysonatype/original/2X/9/990d087ba99963d715a314df852544fa898f0665.png)  
When you do a `docker login` to this Nexus repo, you will use your Nexus username and password, not the GCR authentication.

---

<div class="post-metadata">

**Author:** ![michal.kuzak](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/michal.kuzak/32/1000_2.png) [@michal.kuzak](https://community.sonatype.com/u/michal.kuzak)\
**Post date:** [January 22, 2020, 6:11pm UTC](https://community.sonatype.com/t/how-to-configure-private-google-container-registry-with-nexus-as-proxy/3331/3 "2020-01-22T18:11:56Z")

</div>

Hi thanks for the tips. oauth2accesstoken are short lived tokens if I get a token if will be probably invalid in 15min, no ?

---

<div class="post-metadata">

**Author:** ![psantos99999](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@psantos99999](https://community.sonatype.com/u/psantos99999)\
**Post date:** [September 18, 2024, 1:43pm UTC](https://community.sonatype.com/t/how-to-configure-private-google-container-registry-with-nexus-as-proxy/3331/4 "2024-09-18T13:43:12Z")

</div>

Hi, I have a issue using the http authentication with \_json\_key, it gives this error. Do you have any clue on what is the problem ? I’m using the latest version of Sonatype

[root@xxx yum.repos.d]# yum list  
Invalid configuration value: enabled=3 in /etc/yum.repos.d/artifact-registry-plugin3.repo; invalid boolean value ‘3’  
Google Plugin 2.8 kB/s | 1.4 kB 00:00  
yumrepo-agitept-el8-ext 25 kB/s | 1.5 kB 00:00  
Errors during downloading metadata for repository ‘yumrepo-agitept-el8i-ext’:

- Status code: 404 for [http://xx.xx.xx.xx:8081/repository/alb-yum-proxy-google/repodata/repomd.xml](http://xx.xx.xx.xx:8081/repository/alb-yum-proxy-google/repodata/repomd.xml) (IP: xx.xx.xx.xx)  
Error: Failed to download metadata for repo ‘yumrepo-agitept-el8i-ext’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
