René's URL Explorer Experiment


Title: Permission denied on `config.lock` when cloning in Docker under MacOS · Issue #1566 · gitpython-developers/GitPython · GitHub

Open Graph Title: Permission denied on `config.lock` when cloning in Docker under MacOS · Issue #1566 · gitpython-developers/GitPython

X Title: Permission denied on `config.lock` when cloning in Docker under MacOS · Issue #1566 · gitpython-developers/GitPython

Description: Hi, I found a bug related to the FileLock system. What I'm doing: In Ubuntu 20.04 running under Docker, I'm cloning the repository using clone_from. The directory that I'm cloning to is mounted under MacOS as follows: docker run --rm --i...

Open Graph Description: Hi, I found a bug related to the FileLock system. What I'm doing: In Ubuntu 20.04 running under Docker, I'm cloning the repository using clone_from. The directory that I'm cloning to is mounted und...

X Description: Hi, I found a bug related to the FileLock system. What I'm doing: In Ubuntu 20.04 running under Docker, I'm cloning the repository using clone_from. The directory that I'm cloning to is...

Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1566

X: @github

direct link

Domain: togithub.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Permission denied on `config.lock` when cloning in Docker under MacOS","articleBody":"Hi,\r\nI found a bug related to the `FileLock` system. What I'm doing:\r\n1. In Ubuntu 20.04 running under Docker, I'm cloning the repository using `clone_from`.\r\n2. The directory that I'm cloning to is mounted under MacOS as follows:\r\n`docker run --rm --interactive -v $PWD:/work --user $(id -u):$(id -g) /bin/bash`\r\n3. Docker container is running with UID and GID of the MacOS\r\n\r\nI'm getting this error:\r\n```\r\nException in thread my-repository:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/util.py\", line 941, in _obtain_lock_or_raise\r\n    fd = os.open(lock_file, flags, 0)\r\nPermissionError: [Errno 13] Permission denied: '/work/repo/my-repository.git/.git/config.lock'\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.8/threading.py\", line 932, in _bootstrap_inner\r\n    self.run()\r\n  File \"/app/clone-tool.py\", line 124, in run\r\n    git.Repo.clone_from(self.git_url, repo_dir)\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/repo/base.py\", line 1325, in clone_from\r\n    return cls._clone(\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/repo/base.py\", line 1252, in _clone\r\n    with repo.remotes[0].config_writer as writer:\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/remote.py\", line 1146, in config_writer\r\n    writer = self.repo.config_writer()\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/repo/base.py\", line 604, in config_writer\r\n    return GitConfigParser(self._get_config_path(config_level), read_only=False, repo=self)\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/config.py\", line 366, in __init__\r\n    self._acquire_lock()\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/config.py\", line 385, in _acquire_lock\r\n    self._lock._obtain_lock()\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/util.py\", line 951, in _obtain_lock\r\n    return self._obtain_lock_or_raise()\r\n  File \"/usr/local/lib/python3.8/dist-packages/git/util.py\", line 944, in _obtain_lock_or_raise\r\n    raise IOError(str(e)) from e\r\nOSError: [Errno 13] Permission denied: '/work/repo/my-repository.git/.git/config.lock'\r\n```\r\n\r\nThe `config.lock` file as listed under Ubuntu:\r\n```\r\n$ ls -la\r\nls: cannot access 'config.lock': No such file or directory\r\ntotal 144\r\ndrwxr-xr-x 14 501 dialout    448 Mar 24 13:42 .\r\ndrwxr-xr-x 18 501 dialout    576 Mar 24 13:42 ..\r\n-rw-r--r--  1 501 dialout     23 Mar 24 13:42 HEAD\r\ndrwxr-xr-x  2 501 dialout     64 Mar 24 13:42 branches\r\n-rw-r--r--  1 501 dialout    298 Mar 24 13:42 config\r\n-?????????  ? ?   ?            ?            ? config.lock\r\n-rw-r--r--  1 501 dialout     73 Mar 24 13:42 description\r\ndrwxr-xr-x 14 501 dialout    448 Mar 24 13:42 hooks\r\n-rw-r--r--  1 501 dialout 122075 Mar 24 13:42 index\r\ndrwxr-xr-x  3 501 dialout     96 Mar 24 13:42 info\r\ndrwxr-xr-x  4 501 dialout    128 Mar 24 13:42 logs\r\ndrwxr-xr-x  4 501 dialout    128 Mar 24 13:42 objects\r\n-rw-r--r--  1 501 dialout    114 Mar 24 13:42 packed-refs\r\ndrwxr-xr-x  5 501 dialout    160 Mar 24 13:42 refs\r\n```\r\n\r\nAlso listed under MacOS:\r\n```\r\n$ ls -la\r\ntotal 288\r\ndrwxr-xr-x  14 mmajchrzycki  staff     448 Mar 24 14:42 .\r\ndrwxr-xr-x  18 mmajchrzycki  staff     576 Mar 24 14:42 ..\r\n-rw-r--r--   1 mmajchrzycki  staff      23 Mar 24 14:42 HEAD\r\ndrwxr-xr-x   2 mmajchrzycki  staff      64 Mar 24 14:42 branches\r\n-rw-r--r--@  1 mmajchrzycki  staff     298 Mar 24 14:42 config\r\n----------   1 mmajchrzycki  staff       0 Mar 24 14:42 config.lock\r\n-rw-r--r--   1 mmajchrzycki  staff      73 Mar 24 14:42 description\r\ndrwxr-xr-x  14 mmajchrzycki  staff     448 Mar 24 14:42 hooks\r\n-rw-r--r--   1 mmajchrzycki  staff  122075 Mar 24 14:42 index\r\ndrwxr-xr-x   3 mmajchrzycki  staff      96 Mar 24 14:42 info\r\ndrwxr-xr-x   4 mmajchrzycki  staff     128 Mar 24 14:42 logs\r\ndrwxr-xr-x   4 mmajchrzycki  staff     128 Mar 24 14:42 objects\r\n-rw-r--r--   1 mmajchrzycki  staff     114 Mar 24 14:42 packed-refs\r\n```\r\n\r\nI will provide a minimum set-up (docker file and python script) to reproduce it later.\r\n","author":{"url":"https://github.com/mmajchrzycki","@type":"Person","name":"mmajchrzycki"},"datePublished":"2023-03-24T14:11:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/1566/GitPython/issues/1566"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:11f09357-da56-b73b-2ae9-104e49fe2662
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8CF4:3E1F41:3802A:4F0AD:6968BD79
html-safe-nonce2d3c452210bc1ddaec6252e8675a8103f5537fef1b473b0bf4b557696b2e8fa1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0Y0OjNFMUY0MTozODAyQTo0RjBBRDo2OTY4QkQ3OSIsInZpc2l0b3JfaWQiOiIzOTU5MjI5NzE3MTI1MDUzODE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3b59eb5328fc8ba2fe93c1e4de9039a9886cf30901d43868aae42b7d7b98e9e3
hovercard-subject-tagissue:1639472512
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/gitpython-developers/GitPython/1566/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1129c41ce1cbbda38a27ddcdb4b73bb9e4cb207600973413a99e554d7fabd553/gitpython-developers/GitPython/issues/1566
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1129c41ce1cbbda38a27ddcdb4b73bb9e4cb207600973413a99e554d7fabd553/gitpython-developers/GitPython/issues/1566
og:image:altHi, I found a bug related to the FileLock system. What I'm doing: In Ubuntu 20.04 running under Docker, I'm cloning the repository using clone_from. The directory that I'm cloning to is mounted und...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemmajchrzycki
hostnamegithub.com
expected-hostnamegithub.com
Nonefdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98
turbo-cache-controlno-preview
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
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
release3223a6503d318917691422cdadfbe16cd8fb21e5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://togithub.com/gitpython-developers/GitPython/issues/1566#start-of-content
https://togithub.com/
Sign in https://togithub.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F1566
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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://togithub.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F1566
Sign up https://togithub.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=gitpython-developers%2FGitPython
Reloadhttps://togithub.com/gitpython-developers/GitPython/issues/1566
Reloadhttps://togithub.com/gitpython-developers/GitPython/issues/1566
Reloadhttps://togithub.com/gitpython-developers/GitPython/issues/1566
gitpython-developers https://togithub.com/gitpython-developers
GitPythonhttps://togithub.com/gitpython-developers/GitPython
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/issues/1566
Notifications https://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://togithub.com/gitpython-developers/GitPython
Issues 169 https://togithub.com/gitpython-developers/GitPython/issues
Pull requests 8 https://togithub.com/gitpython-developers/GitPython/pulls
Discussions https://togithub.com/gitpython-developers/GitPython/discussions
Actions https://togithub.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://togithub.com/gitpython-developers/GitPython/security
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/issues/1566
Insights https://togithub.com/gitpython-developers/GitPython/pulse
Code https://togithub.com/gitpython-developers/GitPython
Issues https://togithub.com/gitpython-developers/GitPython/issues
Pull requests https://togithub.com/gitpython-developers/GitPython/pulls
Discussions https://togithub.com/gitpython-developers/GitPython/discussions
Actions https://togithub.com/gitpython-developers/GitPython/actions
Security https://togithub.com/gitpython-developers/GitPython/security
Insights https://togithub.com/gitpython-developers/GitPython/pulse
New issuehttps://togithub.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/1566
New issuehttps://togithub.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/1566
#1619https://github.com/gitpython-developers/GitPython/pull/1619
Permission denied on config.lock when cloning in Docker under MacOShttps://togithub.com/gitpython-developers/GitPython/issues/1566#top
#1619https://github.com/gitpython-developers/GitPython/pull/1619
acknowledgedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22acknowledged%22
help wantedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com/mmajchrzycki
https://github.com/mmajchrzycki
mmajchrzyckihttps://github.com/mmajchrzycki
on Mar 24, 2023https://github.com/gitpython-developers/GitPython/issues/1566#issue-1639472512
acknowledgedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22acknowledged%22
help wantedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22help%20wanted%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.