Comments (14)
I'm seeing the error also.
So are you saying that after the failure, we just run the install.ps1
command again?
from chocolatey-packages.
So are you saying that after the failure, we just run the install.ps1 command again?
Yeah, that should get posh-git installed for you once Chocolately is available on your system.
from chocolatey-packages.
I get an error when attempting this: "The term 'install.ps1' is not recognised..." The only thing in the specified directory is dahlbyk-posh-git-869d4c5
from chocolatey-packages.
I get an error when attempting this: "The term 'install.ps1' is not recognised..." The only thing in the specified directory is dahlbyk-posh-git-869d4c5
Not sure how I missed this - it should work if you cd
into that directory.
from chocolatey-packages.
Got same issue as OP. Followed various threads to end up here. Tried to use install.ps1 but get message "It seems posh-git is already installed..." Huh? Ok, I figure I need to start over, so I attempt "cuninst poshgit" but it says "poshgit is not installed. Cannot uninstall an non-existent package."
from chocolatey-packages.
I should also report that despite Chocolately not knowing if poshgit is installed or not, poshgit does appear to be working now.
from chocolatey-packages.
I just went through this problem, in which poshgit install failed using "cinst poshgit" and failed again trying to directly run ".\install.ps1" from the "c:\tools\poshgit\dahlby##### folder." The error generated by running ".\install.ps1" indicated running scripts was disabled on my system, and I should see "get-help about_signing". I typed that command at the PS prompt and got a page on "about-signing." From that help, the next step was guided by the "TO PERMIT SIGNED SCRIPTS TO RUN:" I ran: "get-executionpolicy" to find that my shell was RESTRICTED, so I ran "set-executionpolicy remotesigned", but that failed because I wasn't running the Powershell elevated. To get the Powershell to run Elevated (as Admin) you type "start-process powershell -Verb runAs" from your existing non-elevate PS prompt, which launched another Powershell window as Elevated. From there, you run the "set-executionpolicy remotesigned" command again (should work), and then, with the policy set to RemoteSigned I was able to go back to "tools\poshgit\dahlby###" and run ".\install.ps1" successfully (or at least that what it indicated).
The key was that my Powershell policy wasn't enabled for Remotely Signed scripts. Once that was done I didn't even need the elevated PS to run .\install.ps1.
I'm an old Unix guy but haven't played with Powershell, so this was new to me. Maybe it'll expedite someone else.
from chocolatey-packages.
I suppose Chocolatey internally runs install scripts with an elevated execution policy?
For others' reference while this is finally resolved, here's the full guide to a manual install (exec policy is step 2): https://github.com/dahlbyk/posh-git/blob/master/readme.md#installing-manual.
from chocolatey-packages.
No, I think the issue for me was that I was running a PS install script in an environment that needed RemoteSigned execution policy but, since I hadn't been doing any PS work, my policy was set to Restricted. I had to jump through a couple hoops to get the execution policy enabled for RemoteSigned scripts (which I assume your script was) before I could go back and run it using cinst, or in this case by directly running install.ps1. My note probably only deals with people that haven't set the proper execution policy for PowerShell. My guess is running chocolately elevated doesn't override the PS policy restrictions, though maybe there's a command line option to do that.
The PS policy problem was not specified by the error message generated when trying to run "cinst" - it generates the System.IO.DirectoryInfo error. Running your script seemed to provide the better indication of my problem: lack of proper PS script execution policy (RemoteSigned).
from chocolatey-packages.
I guess my thought is that since the typical Chocolatey install uses @powershell -ExecutionPolicy Bypass ...
it's possible to get posh-git all the way installed without needing to Set-ExecutionPolicy
such that the generated $PROFILE
will actually run. That seems like something we might be able to at least warn about in our Chocolatey installer.
from chocolatey-packages.
Seems like bypassing the policy restriction silently would save the user
a lot of trouble. Hope it works.
On 2015-05-24 20:24, Keith Dahlby wrote:
I guess my thought is that since the typical Chocolatey install uses @PowerShell -ExecutionPolicy Bypass ... it's possible to get posh-git all the way installed without needing to Set-ExecutionPolicy such that the generated $PROFILE will actually run. That seems like something we might be able to at least warn about in our Chocolatey installer.
Reply to this email directly or view it on GitHub [1].
Links:
[1]
#41 (comment)
from chocolatey-packages.
Seems like bypassing the policy restriction silently would save the user a lot of trouble.
Created dahlbyk/posh-git#196 to see if we can improve that experience.
from chocolatey-packages.
So Posh-Git package has moved to the official posh-git repo. I'm going to close this issue over here. If you are still experiencing issues with it once the new version of the package is released, please followup at https://github.com/dahlbyk/posh-git :)
from chocolatey-packages.
In dahlbyk/posh-git#166, more specifically.
from chocolatey-packages.
Related Issues (20)
- Deprecate the pip package
- upgrade to synergy-core 1.9.1 HOT 1
- Meta: purpose of this package repo?
- Update mysql or remove it HOT 2
- Warning in webpicmd choco install
- Jetty package is broken
- Toggl hasn't been pushed in 2 years HOT 4
- keybase package version is outdated HOT 1
- Installing `mysql`, then uninstalling and installing `mysql --version 5.7.18` leads to server not being reachable HOT 2
- SharpKeys 3.9 is avalable HOT 2
- sumatrapdf* new version HOT 2
- any video converter update HOT 1
- 404 webpicmd download urls HOT 3
- Request: FileZilla portable
- Windirstat path update and shortcuts HOT 2
- ruby2.devkit is broken due to bintray sunset HOT 1
- webPIcmd old download URL HOT 4
- (Google Drive) Update to "Drive For Desktop" HOT 1
- kdiff3 is old in chocolatey/is this the right repo HOT 4
- Duplicate SharpKeys with different version? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolatey-packages.