question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unable to detect PowerShell due to group policy blocking registry access

See original GitHub issue

Description

In the previous version of GitHub desktop client I could specify PowerShell as the shell to launch for a given project, and it gave me cool information in the command line about the current state of the repo (if I was ahead/behind, conflicts, changes, etc.). There is no longer an option for me to select PowerShell in the new version. There is a drop down in advanced options for shell, but it only has “Command prompt” in it.

Version

GitHub Desktop version: 1.0.4

OS version: Microsoft Windows [Version 10.0.15063]

Steps to Reproduce

  1. Launch the client
  2. Go to File -> Options and click on the Advanced tab
  3. Click the drop down for Shell.

Expected: A number of shells are available (cmd, ps, bash, etc.) Actual: only cmd is available.

  1. Launch the cmd shell for a project. Expected: it gives data about the local branch vs. tracking branch in the command line Actual: it does not.

Expected behavior: That I can use PowerShell for git through github desktop client and that it gives me information in the shell about the branch.

Actual behavior: It is not possible and I can only use a command prompt with no info.

Reproduces how often: 100%

Logs

Additional Information

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
begoldsmcommented, Oct 25, 2017

@shiftkey I think I have figured it out. It appears that the logic used to read the registry is being blocked by group policy since it attempts to open the registry location in rw mode. When I launch GitHub desktop as an admin, it is properly finding PowerShell, but when it is launched as a standard user (without admin privileges), it cannot read that key (even though the key is readable through other means as a regular user). At this point, I would say the “fix” is to either use a different, more restrictive system friendly way of determining if PowerShell is available or to come up with a way to install the client in a way that requires admin access only during setup and then maintains its own copy of config settings (maybe?)

0reactions
arshmohdcommented, Oct 28, 2020

@shiftkey yes, that is the policy that is set for all our domain accounts. @danilaml that is potentially a solution, but I wonder if there is some other way to read from the registry without attempting to open it in edit mode (rw). The registry is still accessible (I can use powershell to Get-Item HKLM://…), it just can’t be opened for writes.

Were you able to get around this, I am running into the requirement, registry read is blocked due to GP, is there another way around to just read the registry?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Disable PowerShell with Group Policy
Steps to Disable PowerShell with Group Policy · Step 1: Find the PowerShell.exe file path · Step 2: Create GPO to block PowerShell.exe....
Read more >
Applying Group Policy troubleshooting guidance
On the client where the GPO problem occurs, follow these steps to enable Group Policy Service debug logging. Open Registry Editor. Locate and ......
Read more >
Fix for PowerShell Script cannot be loaded because running ...
Open PowerShell Console by selecting “Run as Administrator” and get the execution Policy with the command: Get-ExecutionPolicy to get the ...
Read more >
Group Policy (GPO) Not Being Applied to Clients
Also, check that the group you have added to the Security Filtering has Read and Apply group policy permissions with the Allow option...
Read more >
How to enable PowerShell Remoting via Group Policy
Enabling PowerShell Remoting using Group Policy provides command-level access to all clients, allowing administrators to fully manage ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found