I'm trying to update yarn proxy configurations but when I launch the command (I'm on Ubuntu 22.04)
yarn config set proxy my.proxy.url:port
I get the error
Usage Error: Couldn't find a configuration settings named "proxy"
All of this because I'm trying to run the yarn install command but all I get is package_name can't be found in the cache and will be fetched from the remote registry for a couple of packages.
I tried to curl some site and it works wonderfully, so it shouldn't be a shell problem (I'm using zsh by the way).
Related
I have got two node version installed using nvm.
When I am trying to switch to other I am getting below error
Looking at some solution, I added "Enabled" to the registry location
HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings\Enabled
but it did not fix it.
Also I tried running this in Administration access cmd window.
I am installing devspace in my local windows machine using npm
npm install -g devspace
after installed, it needs to Finish installation of DevSpace CLI, in which the following request is failed
Error requesting URL: https://github.com/devspace-cloud/devspace/releases/download/v5.1.0/devspace-windows-amd64.exe
I think it's because of my machine is using the company's proxy. However, I don't know how to config proxy in devspace (just like git, for example).
DevSpace maintainer here. Instead of using npm, you can also download the release binary manually from GitHub: https://github.com/devspace-cloud/devspace/releases/
You can just do this:
Download the devspace-windows-amd64.exe for a release
Rename the downloaded file to devspace.exe
Save the devspace.exe file in a folder (and add this folder to your PATH environment variable) => You may need to restart after changing the PATH variable
That's basically what the npm installer does as well but it seems like it is unable to download the binary from GitHub. This may be because of a proxy or because of anything related to GitHub (your company may hit the rate limit or something else).
How do i install Yarn (binary) offline on Centos 7. The machine doesn't have internet. Apologise if the question has been asked before.
I couldn't find it anywhere. All Questions point to using Yarn in offline mode but not how to install it offline at the first place.
Finally, i managed to do it via tarball (Note this is Linux installation).
You can install Yarn by downloading a tarball and extracting it anywhere.
cd /opt
wget https://yarnpkg.com/latest.tar.gz
tar zvxf latest.tar.gz
Yarn is now in /opt/yarn-[version]/
the following steps will add Yarn to path variable and run it from anywhere.
Note: your profile may be in your .profile, .bash_profile, .bashrc, .zshrc, etc.
Add this to your profile:
export PATH="$PATH:/opt/yarn-[version]/bin"
(the path may vary depending on where you extracted Yarn to)
In the terminal, log in and log out for the changes to take effect
To have access to Yarn’s executables globally, you will need to set up the PATH environment variable in your terminal. To do this, add
export PATH="$PATH:`yarn global bin`"
to your profile.
Here is the link i found it
Although Yarn can work in offline mode, the packages must be downloaded and stored in the in an offline mirror. Refer to this article.
Your Centos machine will need to be connected to another machine that has access to the Internet. The most common solution is to set up a http/https proxy, then set up yarn to use the proxy
yarn config set proxy http://proxy.server.com:8080
yarn config set https-proxy http://proxy.server.com:8080
I am trying to install gcloud SDK while using a coporate network which works behind a proxy (and a VPN sometimes). I get proxy settings automatically using a pac.fcgi file (Automatic Proxy Configuration).
Now when I try to run ./install.sh in the terminal, I am constantly getting the following error
➜ google-cloud-sdk ./install.sh
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)?
ERROR: (gcloud.components.list) Failed to fetch component listing from server. Check your network settings and try again.
I found this SO question which was having the same issue, but their problem was related to ipv6. I already have ipv6 disabled (I can't even enable it) and I am using ethernet to connect to the network. Thus the answer is not useful to me.
I searched for proxy related info about installation and found this page. It asks for using a non-interactive installer instead and using gcloud command to set the proxy after installation. My problem is that I can't even install gcloud. I have tried with both interactive and non-interactive installers.
Any way I can install gcloud while being behind a corporate proxy.
PS: I am on macOS High Sierra and using zsh shell (already tried bash), in case it matters.
So, the problem was I was unable to set proxy before installation of gcloud. The installation of gcloud basically set the CLI in the path and installs some required components (core, bq, gsutil etc).
So what I did is I added the following lines in my .zshrc
source <PATH to gcloud sdk>/google-cloud-sdk/path.zsh.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.zsh.inc
or if you're using bash, add these lines in your .bashrc or .bash_profile
source <PATH to gcloud sdk>/google-cloud-sdk/path.bash.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.bash.inc
After that I restarted the terminal (or just run source ~/.zshrc or source ~/.bashrc or source ~/.bash_profile on terminal)
Now I was able to use gcloud commands. I ran gcloud init, set the proxy and then installed the required components using the following command -
gcloud components install core bq gsutil
And I installed gcloud without using the install.sh script.
PS: Run scutil --proxy to know the proxy settings set in your system.
For Windows 10 users who experience this issue. I installed the google SDK from the archived versions page. then used git bash to install using ./google-cloud-sdk/install.sh. then added in environment variable manually to PATH to use commands.
I am using a a devpi-server to locally cache and install pypi packages using pip. However when I search for packages using the devpi server I get the following error:
pypi.xyz.com is the name of the server
ProtocolError: <ProtocolError for pypi.xyz.com:33141/root/pypi/+simple/: 405 Method Not Allowed>
Note that install work just fine
Edit: I am using a proxy that is allowed to access pypi.xyz.com by setting http_proxy before calling the pip command. The proxy is working fine and allows access to the pypi.xyz.com server as you can run the pip install commands without any trouble.
pip.conf:
[global]
[install]
index-url = http://pypi.xyz.com:33141/root/pypi/+simple/
[search]
index = http://pypi.xyz.com:33141/root/pypi/+simple/
Adding the clarifications requested by #JanVlcinsky:
1. Installed devpi using pypi
2. None of the default settings were modified except the port change
3. Protocol Error is in the console when I use pip with the following environment variable set
export http_proxy=http://localhost:33128
Changed port to 33141 Just for some obfuscation security, try to avoid using defaults
It is an http_proxy (running locally using squid)
You can find the answer in the "using pip search" section of the official doc:
pip install -q -U devpi-web
devpi-server --stop
devpi-server --recreate-search-index
devpi-server --start