On my OSX M1 Mac I have the following keyring setup which works with Google Artifact Repository to resolve dependencies when using python on the command line shell. Refer to https://cloud.google.com/artifact-registry/docs/python/store-python
$ keyring --list-backends
keyring.backends.chainer.ChainerBackend (priority: 10)
keyring.backends.fail.Keyring (priority: 0)
keyring.backends.macOS.Keyring (priority: 5)
keyrings.gauth.GooglePythonAuth (priority: 9)
If I try to install the dependencies from within PyCharm it does not work automatically, it prompts for a user as can be seen. I expected it to resolve the dependencies automatically from my already authenticated account. How to get PyCharm to work with Google Artifact Repository?

Based on your description, I suppose you have successfully set up the Python virtual environment (venv) and installed all the dependencies via the terminal (Step 1-4 in https://cloud.google.com/artifact-registry/docs/python/store-python). And you want PyCharm also run your Python codes using that virtual environment.
Usually, PyCharm will create a new Python virtual environment or use the default Python interpreter on your machine when you first open a project. That is why you will have to install the dependencies again.
In order to make PyCharm run your project using the venv you have created earlier (through the command line), go to the Setting -> Project: your-project-name -> Python interpreter -> Add -> Choose Existing environment -> Hit ... -> Navigate to the the venv folder you created -> Select venv/bin/python.exe or venv/bin/python3.exe or venv/bin/python.
After that PyCharm will run your project using the existing virtual environment, and you don't have to install everything again. I am from Upwork, by the way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With