'Local yum repo hosted on SMB Share

I currently have a few RHEL repositories saved on an SMB Share.

i am authenticated to this share via a DOMAIN\user account.

a /etc/yum.repos.d/local.repo file is appropiatley pointing to the dir. in this case the line is:

baseurl=file:/"//run/user/1005/gvfs/smb-share:fileserver0,share=RepoShare"

When I run a sudo yum command (presumably I am root and no longer the domain user?) I get an error.

The error is:

file:///run/user/1005/gvfs/smb-share:server=fileserver0%20share=RepoShare/Repo/repodata/repomd.xml: 
[Errno 14] curl#37 - "Couldn't open file /run/user/1005/gvfs/smb-share:server=fileserver0%20share=RepoShare/Repo/repodata/repomd.xml"
Trying other mirror.

Anyone have any experience hosting a repo on an SMB share for linux clients to pull from?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source