Where exactly do you put a .pypirc file

Where do you create a .pypirc file when uploading packages, what would the path look like. when I tried to use mine, I got an error saying config could not find test pypi url etc. I don’t think twine even found my .pypirc file.