Okay, never mind. Running "guix environment guix" instead of "guix environment guix --pure" lets preserve the environment variables needed for X.509 certificates to be available for git in the environment. If that's not the correct way of doing this please let me know, but now I'm able to run "guix refresh", so the issue can be closed.
Thank you all for suggestions. Jan Wielkiewicz