Open DennisL68 opened 3 months ago
The script in the docs is intended to be used to install Chocolatey CLI from a separate repository and allows multiple options. The steps you provide don't go through that.
Step 2 doesn't take into account the credentials for the repository, the compression method, the execution policy etc.
The script at Completely offline install doesn't install Chocolatey properly
What doesn't work?
the command won't be available in any new PowerShell sessions
Which command? choco
?
I volunter to take care of this issue, got time next week. I set up offline installer couple of weeks ago, can follow official docs again and verify if something could be improved and compare it to the reported.
Hey @DennisL68, if could please answer on pauby's questions. Could also help out if you point out exact section of documentation that you took, where it got confusing and lead you to opening issue and proposing approach you shared.
I ran with success by following next steps (could not find any issue with install.ps1):
Prerequisites are present on Windows machine:
set $env:chocolateyUseWindowsCompression = 'true'
https://community.chocolatey.org/install.ps1 downloaded and located into your preferred directory, for this example I used
C:\OfflineInstaller
Downloaded latest chocolatey package and located to same directory as install.ps1
In install.ps1 file I edited value for $ChocolateyDownloadUrl =
[CmdletBinding(DefaultParameterSetName = 'Default')]
param(
# The URL to download Chocolatey from. This defaults to the value of
# $env:chocolateyDownloadUrl, if it is set, and otherwise falls back to the
# official Chocolatey community repository to download the Chocolatey package.
# Can be used for offline installation by providing a path to a Chocolatey.nupkg.
[Parameter(Mandatory = $false)]
[string]
$ChocolateyDownloadUrl = 'file:C:\OfflineInstaller\chocolatey.2.3.0.nupkg',
I personally wished when I was fresh to Chocolatey and had my first time preparing offline installer to find plain simple Powershell solution offline instructions as I just shared above. Instead of Puppet, I feel it's easier for onboarding flow to build up the understanding instead of skip onto configuration management. I also kind of missed out on the install.ps1 link and instead went with puppet proposed but I wasn't going to use Puppet, so I got lost in the read flow there a little. I feel if we understand the base ground first we'll also be able to switch it to installing chocolatey via configuration management but that is just me 😊 I simply made me personal note back then and use it whenever I'd need it. Am curious if it's just me or there are more who had such experience and we could use small improvement in reader flow there.
@LeaDevelop
I'll have a look at it next week. We are about to reinstall that server anyway soon along with detailed instructions.
So this is something I'll need to do soon anyway 👍
@DennisL68 how did it go?
Not there yet :/
We had to prioritize a big migration work first that is still under due.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue will be closed in 14 days if it continues to be inactive.
What New Or Updated Would You Like To See?
The script at Completely offline install should be replaced with.
https://community.chocolatey.org/install.ps1
to local drive.\install.ps1 -ChocolateyDownloadUrl <c:\downloadpath\chocolatey.x.x.x.nupkg>
Why Is It Needed?
The script at
Completely offline install
doesn't install Chocolatey properly and the command won't be available in any new PowerShell sessions.