Skip to content

Add /github/workspace to git safe.directory#1427

Merged
orta merged 1 commit into
danger:masterfrom
hiro-flank:fix/dubious_ownership_github_workspace
Feb 7, 2023
Merged

Add /github/workspace to git safe.directory#1427
orta merged 1 commit into
danger:masterfrom
hiro-flank:fix/dubious_ownership_github_workspace

Conversation

@hiro-flank

Copy link
Copy Markdown
Contributor

Description

Docker image ruby:2.7.7 uses Git version 1:2.30.2-1+deb11u1, which includes the CVE-2022-24765 patch.
This changes caused the following error in the Github actions.

fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

	git config --global --add safe.directory /github/workspace

...

bundler: failed to load command: danger (/usr/local/bundle/bin/danger)
/myapp/lib/danger/scm_source/git_repo.rb:118:in `raise_if_we_cannot_find_the_commit': Commit <COMMIT_HASH> doesn't exist. Are you running `danger local/pr` against the correct repository? Also this usually happens when you rebase/reset and force-pushed. (RuntimeError)

It looks like we need to add /github/workspace to safe.directory.

Related

@hiro-flank hiro-flank changed the title fix: add /github/workspace to git safe.directory Add /github/workspace to git safe.directory Feb 7, 2023
@hiro-flank hiro-flank marked this pull request as ready for review February 7, 2023 14:28
@hiro-flank hiro-flank force-pushed the fix/dubious_ownership_github_workspace branch from 47b12a1 to 9af03ad Compare February 7, 2023 14:29
@orta

orta commented Feb 7, 2023

Copy link
Copy Markdown
Member

Thanks, looks good to me

@orta orta merged commit c2bb178 into danger:master Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants