René's URL Explorer Experiment


Title: "Anonymous credentials cannot be refreshed" with fake-gcs-server · Issue #102 · googleapis/python-storage · GitHub

Open Graph Title: "Anonymous credentials cannot be refreshed" with fake-gcs-server · Issue #102 · googleapis/python-storage

X Title: "Anonymous credentials cannot be refreshed" with fake-gcs-server · Issue #102 · googleapis/python-storage

Description: OS type and version: Ubuntu 18.04 Python version: 3.7.6 pip version: 20.0.2 google-cloud-storage version: 1.27.0 I'm trying to use fake-gcs-server for local GCS testing. Basic client setup works fine: >>> creds = AnonymousCredentials() >...

Open Graph Description: OS type and version: Ubuntu 18.04 Python version: 3.7.6 pip version: 20.0.2 google-cloud-storage version: 1.27.0 I'm trying to use fake-gcs-server for local GCS testing. Basic client setup works fi...

X Description: OS type and version: Ubuntu 18.04 Python version: 3.7.6 pip version: 20.0.2 google-cloud-storage version: 1.27.0 I'm trying to use fake-gcs-server for local GCS testing. Basic client setup work...

Opengraph URL: https://github.com/googleapis/python-storage/issues/102

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Anonymous credentials cannot be refreshed\" with fake-gcs-server","articleBody":"  - OS type and version: Ubuntu 18.04\r\n  - Python version: 3.7.6\r\n  - pip version: 20.0.2\r\n  - `google-cloud-storage` version: 1.27.0\r\n\r\nI'm trying to use [fake-gcs-server](https://github.com/fsouza/fake-gcs-server) for local GCS testing.\r\n\r\nBasic client setup works fine:\r\n```python\r\n\u003e\u003e\u003e creds = AnonymousCredentials() \r\n\u003e\u003e\u003e options = ClientOptions(api_endpoint=\"http://127.0.0.1:4443\") \r\n\u003e\u003e\u003e client = gcs.Client(credentials=creds, client_options=options, project='') \r\n```\r\n\r\nI can list buckets and blobs:\r\n```python\r\n\u003e\u003e\u003e print(list(client.list_buckets()))                                                                                                                                      \r\n[\u003cBucket: bucket1\u003e, \u003cBucket: bucket2\u003e]\r\n\u003e\u003e\u003e print(list(client.list_blobs('bucket1')))                                                                                                                               \r\n[\u003cBlob: bucket1, hello.txt, 1586453246295809\u003e,\r\n \u003cBlob: bucket1, subdir/toto.txt, 1586453246295810\u003e]\r\n\u003e\u003e\u003e a, b = client.list_blobs('bucket1')                                                                                                                                     \r\n\u003e\u003e\u003e a.size                                                                                                                                                                  \r\n548\r\n\u003e\u003e\u003e a.name                                                                                                                                                                  \r\n'hello.txt'\r\n\u003e\u003e\u003e a.id                                                                                                                                                                    \r\n'bucket1/hello.txt'\r\n```\r\n\r\n`fake-gcs-server` doesn't need any credentials, so reading the file should just work. But for some reason it doesn't:\r\n```python\r\n\u003e\u003e\u003e a.download_as_string()                                                                                                                                                  \r\nTraceback (most recent call last):\r\n  File \"\u003cipython-input-19-72ec41b6efbf\u003e\", line 1, in \u003cmodule\u003e\r\n    a.download_as_string()\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/cloud/storage/blob.py\", line 879, in download_as_string\r\n    raw_download=raw_download,\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/cloud/storage/blob.py\", line 796, in download_to_file\r\n    transport, file_obj, download_url, headers, start, end, raw_download\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/cloud/storage/blob.py\", line 720, in _do_download\r\n    download.consume(transport)\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/resumable_media/requests/download.py\", line 151, in consume\r\n    result = _helpers.http_request(transport, method, url, **request_kwargs)\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/resumable_media/requests/_helpers.py\", line 136, in http_request\r\n    return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/resumable_media/_helpers.py\", line 150, in wait_and_retry\r\n    response = func()\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/auth/transport/requests.py\", line 482, in request\r\n    self.credentials.refresh(auth_request)\r\n  File \"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/auth/credentials.py\", line 148, in refresh\r\n    raise ValueError(\"Anonymous credentials cannot be refreshed.\")\r\nValueError: Anonymous credentials cannot be refreshed.\r\n```\r\n","author":{"url":"https://github.com/pitrou","@type":"Person","name":"pitrou"},"datePublished":"2020-04-09T17:50:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/102/python-storage/issues/102"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b7826991-051f-a9d0-888d-cba36a8717f3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE7E4:1EDF:6F30E5:9FB692:6A4E5084
html-safe-nonce71cc0b319e4518843fe9660e26db333944b56660b23c1f8e0d918b4b3c7c1dd9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0U0OjFFREY6NkYzMEU1OjlGQjY5Mjo2QTRFNTA4NCIsInZpc2l0b3JfaWQiOiI0MDA2NzQzNzQyMDM5ODcxNjIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac857f9632cfa1e8c35e34d6c2b95e88e167917b87cb17b514649bd89e6e4e1c0f
hovercard-subject-tagissue:597451263
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-storage/102/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3f06598da5c43650e8fcc09f1021771aeb1ef560b3291487fcc025838660cd11/googleapis/python-storage/issues/102
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3f06598da5c43650e8fcc09f1021771aeb1ef560b3291487fcc025838660cd11/googleapis/python-storage/issues/102
og:image:altOS type and version: Ubuntu 18.04 Python version: 3.7.6 pip version: 20.0.2 google-cloud-storage version: 1.27.0 I'm trying to use fake-gcs-server for local GCS testing. Basic client setup works fi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepitrou
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-storage git https://github.com/googleapis/python-storage.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id226992639
octolytics-dimension-repository_nwogoogleapis/python-storage
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id226992639
octolytics-dimension-repository_network_root_nwogoogleapis/python-storage
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef344f1eab54fc7dfc02d0d018cda7e158c3db65c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-storage/issues/102#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-storage%2Fissues%2F102
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-storage%2Fissues%2F102
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-storage
Reloadhttps://github.com/googleapis/python-storage/issues/102
Reloadhttps://github.com/googleapis/python-storage/issues/102
Reloadhttps://github.com/googleapis/python-storage/issues/102
Please reload this pagehttps://github.com/googleapis/python-storage/issues/102
googleapis https://github.com/googleapis
python-storagehttps://github.com/googleapis/python-storage
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-storage
Fork 172 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-storage
Star 502 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-storage
Code https://github.com/googleapis/python-storage
Issues 0 https://github.com/googleapis/python-storage/issues
Pull requests 0 https://github.com/googleapis/python-storage/pulls
Actions https://github.com/googleapis/python-storage/actions
Projects https://github.com/googleapis/python-storage/projects
Security and quality 0 https://github.com/googleapis/python-storage/security
Insights https://github.com/googleapis/python-storage/pulse
Code https://github.com/googleapis/python-storage
Issues https://github.com/googleapis/python-storage/issues
Pull requests https://github.com/googleapis/python-storage/pulls
Actions https://github.com/googleapis/python-storage/actions
Projects https://github.com/googleapis/python-storage/projects
Security and quality https://github.com/googleapis/python-storage/security
Insights https://github.com/googleapis/python-storage/pulse
#107https://github.com/googleapis/python-storage/pull/107
"Anonymous credentials cannot be refreshed" with fake-gcs-serverhttps://github.com/googleapis/python-storage/issues/102#top
#107https://github.com/googleapis/python-storage/pull/107
https://github.com/HemangChothani
api: storageIssues related to the googleapis/python-storage API.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22api%3A%20storage%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/pitrou
pitrouhttps://github.com/pitrou
on Apr 9, 2020https://github.com/googleapis/python-storage/issues/102#issue-597451263
fake-gcs-serverhttps://github.com/fsouza/fake-gcs-server
HemangChothanihttps://github.com/HemangChothani
api: storageIssues related to the googleapis/python-storage API.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22api%3A%20storage%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.