# Integrate Sonatype Nexus with Google Artifact Registry for RPM

**URL:** <https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481>\
**Category:** Sonatype Nexus Repository\
**Tags:** help\
**Created:** [September 18, 2024, 1:43pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481 "2024-09-18T13:43:24Z")\
**Posts on this page:** 9\
**Page:** 1

<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/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/1 "2024-09-18T13:43:24Z")

</div>

Need to configure Sonatype Nexus has a proxy (format yum / proxy) to Google Artifact Registry for RPM. For the authentication on Google used the an service account and on the configuration for the user put Username =\_json\_key and on the Password the content of the SA. When I tried to access the GAR using Nexus has a proxy I got this error. Is there any configurations that is missing ?

[root@infra-dev-server-tmarques ~]# yum list  
Google64 1.2 kB/s | 1.5 kB 00:01  
Errors during downloading metadata for repository ‘google64’:

- Status code: 404 for [http://10.112.14.144:8081/repository/alb-yum-proxy-google\_base64/repodata/repomd.xml](http://10.112.14.144:8081/repository/alb-yum-proxy-google_base64/repodata/repomd.xml) (IP: 10.112.14.144)  
Error: Failed to download metadata for repo ‘google64’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried  
[root@infra-dev-server-tmarques ~]#

If I connect directly to GAR with the SA it works fine.

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 19, 2024, 4:30pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/2 "2024-09-19T16:30:46Z")

</div>

Hi, you’d need to take a look at the logs from Nexus to understand what the issue is.

---

<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 20, 2024, 1:53pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/3 "2024-09-20T13:53:08Z")

</div>

On the logs file I have the same information that I provided, status code 404, no clues about the error. Can you give an example of the configuration that needs to be done on Sonatype to compare with what I done ?

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 20, 2024, 3:06pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/4 "2024-09-20T15:06:29Z")

</div>

Perhaps the configuration of the repository doesn’t have the correct URL for proxying. I believe for Yum that the request paths directly map onto the remote.

i.e. `http://10.112.14.144:8081/repository/alb-yum-proxy-google_base64/repodata/repomd.xml` would map to `https://host/path/repodata/repomd.xml`

---

<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 23, 2024, 1:53pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/5 "2024-09-23T13:53:07Z")

</div>

Additional information on the logs:

2024-09-21 19:57:17,028+0100 DEBUG [qtp2020819268-3123] \*UNKNOWN org.sonatype.nexus.repository.cache.NegativeCacheHandler - Handling NotFoundCache for PathNegativeCacheKey{path=‘/repodata/repomd.xml’}  
2024-09-21 19:57:17,029+0100 DEBUG [qtp2020819268-3123] \*UNKNOWN org.sonatype.nexus.repository.cache.NegativeCacheHandler - Found PathNegativeCacheKey{path=‘/repodata/repomd.xml’} in negative cache, returning Response{status=Status{successful=false, code=404, message=‘null’}, payload=null}

---

<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 23, 2024, 1:53pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/6 "2024-09-23T13:53:15Z")

</div>

> [@mpiggott](#):
>
> repodata/repomd.xml

I tried adding the repodata/repomd.xml on the path and it did not work, the error is still the same

[root@infra-dev-server-tmarques yum.repos.d]# dnf list  
Google 7.0 kB/s | 1.5 kB 00:00  
Errors during downloading metadata for repository ‘google’:

- Status code: 404 for [http://10.112.14.144:8081/repository/alb-yum-proxy-google/repodata\_base64/repomd.xml](http://10.112.14.144:8081/repository/alb-yum-proxy-google/repodata_base64/repomd.xml) (IP: 10.112.14.144)  
Error: Failed to download metadata for repo ‘google’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried  
[root@infra-dev-server-tmarques yum.repos.d]#

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 23, 2024, 6:21pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/7 "2024-09-23T18:21:50Z")

</div>

> [@psantos99999](#):
>
> 2024-09-21 19:57:17,028+0100 DEBUG [qtp2020819268-3123] \*UNKNOWN org.sonatype.nexus.repository.cache.NegativeCacheHandler - Handling NotFoundCache for PathNegativeCacheKey{path=‘/repodata/repomd.xml’}  
> 2024-09-21 19:57:17,029+0100 DEBUG [qtp2020819268-3123] \*UNKNOWN org.sonatype.nexus.repository.cache.NegativeCacheHandler - Found PathNegativeCacheKey{path=‘/repodata/repomd.xml’} in negative cache, returning Response{status=Status{successful=false, code=404, message=‘null’}, payload=null}

This suggests the URL configured as the remote is not correct, or that the yum client isn’t configured correctly.

---

<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 24, 2024, 1:34pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/8 "2024-09-24T13:34:38Z")

</div>

> [@mpiggott](#):
>
> This suggests the URL configured as the remote is not correct, or that the yum client isn’t configured correctly.

Hi, can you provide a sample configuration (printscreen) of you have configured on the Nexus application and a sample of the /etc/yum.repos.d/ file ? we have tried several configuration and no one works.

---

<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:** [October 5, 2024, 3:01pm UTC](https://community.sonatype.com/t/integrate-sonatype-nexus-with-google-artifact-registry-for-rpm/13481/9 "2024-10-05T15:01:28Z")

</div>

Hi

Answering to your question, the URL is correct
