Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2874959
D25149.1736968245.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25149.1736968245.diff
View Options
diff --git a/src/applications/config/controller/PhabricatorConfigConsoleController.php b/src/applications/config/controller/PhabricatorConfigConsoleController.php
--- a/src/applications/config/controller/PhabricatorConfigConsoleController.php
+++ b/src/applications/config/controller/PhabricatorConfigConsoleController.php
@@ -150,6 +150,16 @@
$log_futures = array();
$remote_futures = array();
+ // Git commands needs the HOME environment variable
+ // to read their .gitconfig - otherwise you cannot
+ // fix errors like "detected dubious ownership"
+ // https://we.phorge.it/T15282
+ $commands_env = array();
+ $webserver_user = posix_getpwuid(posix_geteuid());
+ if ($webserver_user !== false) {
+ $commands_env['HOME'] = $webserver_user['dir'];
+ }
+
foreach ($specs as $lib) {
$root = dirname(phutil_get_library_root($lib));
@@ -161,9 +171,11 @@
'git remote -v');
$log_futures[$lib] = id(new ExecFuture('%C', $log_command))
+ ->setEnv($commands_env)
->setCWD($root);
$remote_futures[$lib] = id(new ExecFuture('%C', $remote_command))
+ ->setEnv($commands_env)
->setCWD($root);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jan 15 2025, 19:10 (5 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1116195
Default Alt Text
D25149.1736968245.diff (1 KB)
Attached To
Mode
D25149: Config page: add $HOME to allow a gitconfig and help on "dubious ownership"
Attached
Detach File
Event Timeline
Log In to Comment