I am struggling with the Bower's installation behind my company's network.
Despite of setting npm proxy and bower proxy (in the .bowerrc file), as suggested in many other posts, I still get this error:
bower ECONNREFUSED Request to https://bower.herokuapp.com/packages/bootstrap-sass-official failed: connect ECONNREFUSED
On the other hand node, npm and grunt seem to work well.
Can anybody help with some other idea about how to tackle the problem?
Try to create a file named ".bowerrc" inside your user profile (usually at "C:/Users/[YOUR USERNAME]" or "%USERPROFILE%" shortcut).
Try to put this inside your file and save:
{
"registry": "http://bower.herokuapp.com"
}
If that doesn't work, try to put this:
{
"registry": "http://bower.herokuapp.com",
"proxy": "http://<user>:<pwd>#proxy.host.br:8080",
"https-proxy": "http://<user>:<pwd>#proxy.host.br:8080",
"strict-ssl": false
}
PS.: You will need to know your company's proxy address.
Have you tried:
http_proxy='proxyserver' https_proxy='proxyserver' bower install
?
{
"directory": "library",
"registry": "http://bower.herokuapp.com",
"proxy":"http://<USERNAME>:<PASSWORD>#<PROXY_IP>:<PROXY_PORT>/",
"https-proxy":"http://<USERNAME>:<PASSWORD>#<PROXY_IP>:<PROXY_PORT>/"
}
This code worked for me. I am using Win 7 and chrome and also git bash. Here few things need to be cleared. This takes me huge time to find the actual data regarding the user name, password, proxy IP and Port. I will describe it step by step so that every learners can easily grasp the message:
Create a file in the notepad named .bowerrc in the login folder; You can go there by typing at Start>Run>%UserProfile% and press OK.
Type above code in the .bowerrc file with the following changes:
Replace <USERNAME> with your internet connection user ID or login ID
Replace <PASSWORD> with your internet connection password or login password.
Replace <PROXY_IP> and <PROXY_PORT> with the working proxy IP address and its port number.
Note: There should be no angle brackets.
Proxy IP should be different than your own IP.
Before using any proxy IP and port you should check it is working by changing your proxy IP and port.
You can go through this link to know the details of proxy settings at description here
From this proxy settings you will get Proxy IP and Port.
Recheck all the input so that all are correct and save and close the file.
Open git bash and change directory to the project file and type command and hit enter, in my case, git bash command:
a#a-PC MINGW32 /d/conFusion
$ bower install
It worked like magic.
In my case, my .bowerrc file was using a proxy (so .bowerrc had both proxy and https-proxy properties set, without any username or password).
Those were causing me the ECONNREFUSED.
https://github.com/jquery/jquery.git", exit code of #128 fatal: unable to access 'https://github.com/jquery/jquery.git/':
Failed to connect to webproxy.wlb2.nam.nsroot.net port 8080: Connection refused
Additional error details:
fatal: unable to access 'https://github.com/jquery/jquery.git/':
Failed to connect to webproxy.wlb2.nam.nsroot.net port 8080: Connection refused
I removed them, (my current internet connection is not behind a proxy), and so errors stopped.
Related
I want to connect to my school gitlab (self-hosted) with gitkraken.
It create the repo when i try to init but a few second later i get this error :
failed to connect to (school.gitlab.url) invalid argument
I'm on win7 x64
gitkraken v4.0.5
I'm connected to the gitlab on gitkraken and my SSH key is good.
I also try to desactivate my firewall but no change.
Can someone help me please?
I would set up a proxy, that fixed it for me.
On windows:
Press win key
Type proxy settings
Turn on use a proxy server
Type in IP and port (google free proxies to find one)
Press save
GitKraken should detect the proxy
OS: Ubuntu 16.04
Hypervisor: VirtualBox
Network configuration: Nat Network with port forwarding to access the vms through the host ip. I can also ping a VM from another VM.
I try to connect my Jenkins app hosted on a VM to my BitBucket server also on a VM. I followed a tutorial on internet but when i enter the address of my git repository i'm getting this:
Failed to connect to repository : Command "usr/bin/git ls-remote -h http://admin#192.168.6.102:8005/scm/tes/repository-test.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'http://admin#192.168.6.102:8005/scm/tes/repository-test.git/': The requested URL returned error: 403
So, to be sure I tried to exectute the command on the terminal... and on the terminal it seems to work.. I can also push, clone, pull etc..
On this image you can see that it's true
Do you have an explanation?
EDIT:
I try some others things like use or not sudo to see if the permissions problem came from that and it seems that it's not the case.
But I see that there is no result when we use the "HEAD" argument.
Do you think that because "HEAD" give no result, git in jenkins interprets it like no answer and returns the damn** error 403?
EDIT 2:
I found that on the web: http: // jenkins-ci.361315.n4.nabble.com/Jenkins-GIT-ls-remote-error-td4646903.html
The guy has the same problem but in a different way, I will try to allocate more RAM to see if it does the trick.
There could be many possible problems, but you are getting 403 - Access Forbidden, which indicates some problem with permissions. I would suggest first common mistakes:
a) trying https instead http - my scm only uses https,
b) check if admin is correct - scm by default uses scmadmin.
Here I run the exact same command twice.
The first time I used the proxy configuration wich I need to access internet, and the second time I set the mandatory server on "none".
So there is a problem with the damn proxy.
I was thinking that the proxy was not used in NAT connection with VirtualBox...
I found the solution.
I had to reinstall jenkins to have a user named "jenkins" with his own home directory.
I don't know if it is linked or not, but I configured my bitbucket server to use only HTTPS with a self signed certificate (I work in lan)
My troubleshoot was linked with my proxy settings.
I disabled all my proxy settings in Linux so I was able to launch the command that did'nt worked in jenkins with terminal.
I logged with sudo su jenkins the commands also worked.
I found out that in the home directory of the jenkins user there was a "proxy.xml" file. I opened it and saw my old proxy settings.
I deleted all the content with vim, saved and restarted and the error was gone.
there can be git version miss match.....
I would suggest you update git once. maybe it will resolve your issues.
When i run composer update it fails showing error:
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream:
Connection refused
If i visit the URL from my browser it goes through, when i try to wget or curl the URL from my terminal it shows error:
--2017-02-05 20:41:58-- https://packagist.org/packages.json
Connecting to 127.0.0.1:8888... failed:
Connection refused.
--2017-02-05 20:41:58-- https://packagist.org/packages.json
Connecting to 127.0.0.1:8888... failed: Connection refused.
I think its something with proxy connection, but then i can't seem to solve the issue.
Bellow is the full trace if i run composer update -vv:
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/var/www/gidiscrap): git branch --no-color --no- abbrev -v
Cannot create cache directory /home/oluwaslim/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/oluwaslim/.composer/cache/files/, or directory is not writable. Proceeding without cache
Failed to initialize global composer: Composer could not find the config file: /home/oluwaslim/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /var/www/gidiscrap/vendor/composer/installed.json
Running 1.3.2 (2017-01-27 18:23:41) with PHP 7.0.13-0ubuntu0.16.04.1 on Linux / 4.4.0-59-generic
Loading composer repositories with package information
Downloading https://packagist.org/packages.json using proxy 127.0.0.1:8888
Downloading https://packagist.org/packages.json using proxy 127.0.0.1:8888
Downloading https://packagist.org/packages.json using proxy 127.0.0.1:8888
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection refused
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php:489
Composer\Util\RemoteFilesystem->get() at phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php:101
Composer\Util\RemoteFilesystem->getContents() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:665
Composer\Repository\ComposerRepository->fetchFile() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:479
Composer\Repository\ComposerRepository->loadRootServerFile() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:258
Composer\Repository\ComposerRepository->hasProviders() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Pool.php:99
Composer\DependencyResolver\Pool->addRepository() at phar:///usr/local/bin/composer/src/Composer/Installer.php:376
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:223
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:158
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:850
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:227
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:124
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:100
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:54
require() at /usr/local/bin/composer:24
Help would be appriciated! I can't seem to get past this error
Am on Ubuntu Linux 16.04, and below is what i had to do to fix the issue, as i mentiond earlier its some problem with proxy settings.
Step 1
Goto System settings
Network
Network proxy
Change it to none
finally click Apply system wide
Step 2
Open terminal and type the following command.
unset https_proxy && unset socks_proxy && unset ftp_proxy
Finally restart your system. The solution above got the issue solved for me.
The line using proxy 127.0.0.1:8888 suggest a problem with your system. I can guess that's a really aggressive antivirus. You should have no reason to connect to localhost on port 8888 unless you have to connect through proxy. What can you do? Check the antivirus settings and turn off checks for secure connections over HTTPS.
git clone https://git.torproject.org/pluggable-transports/meek.git
fatal: unable to access 'https://git.torproject.org/pluggable-transports/meek.git/': Failed to connect to gitweb.torproject.org port 443: Connection timed out
and I get TorBrowser running ,and config git with
git config --global http.proxy 'socks5://127.0.0.1:9150'
git config --global https.proxy 'socks5://127.0.0.1:9150'
and git clone get these message:
fatal: unable to access 'https://git.torproject.org/pluggable-transports/meek.git/': Can't complete SOCKS5 connection to 0.0.0.0:0. (1)
Does meek source code accessible?
I want use tor not JUST TorBrowser Bundle . and I need meek to get out the GFW .
curl https://torproject.org --socks5 '127.0.0.1:9150'
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (6)
TorBrowser 6.0.6 is running
ScreenShot
The apparent problem is that Git's HTTP(S) proxy doesn't do DNS resolution over SOCKS and relies on your system DNS server. So when you try to clone (via https://gitweb.torproject or the .onion site) it's doing a DNS lookup through your default DNS servers which I think are giving you bad information.
This should work (because it resolves DNS over Tor):
curl https://torproject.org --socks5-hostname '127.0.0.1:9150'
While this probably doesn't (because it uses your default DNS servers):
curl https://torproject.org --socks5 '127.0.0.1:9150'
That said, I didn't try very hard or look more into having Git's proxy resolve DNS over SOCKS, but the easier thing to do is try using torsocks or proxychains.
Go to https://github.com/rofl0r/proxychains-ng - download, configure, build, and install. Then edit /etc/proxychains.conf and change socks4 127.0.0.1 9050 to socks5 127.0.0.1 9150
Then run:
./proxychains4 git clone http://dccbbv6cooddgcrq.onion/pluggabletransports/meek.git
If it works, you're set.
The directory permissions are fine. They show up funny in the web viewer d--------- but when you clone it, the directories will get permissions (probably 0755) based on your umask.
In any case, if you're still stuck, I've uploaded the meek git clone to https://drew.co.il/downloads/meek.zip so you can try to download that. It'll have the .git directory in it in case you need that later.
I checked meek source tree ,and find out it has d--------- permission . There is no 'w',nor 'x' and no 'r' ,but yet ,the directory can be accessed from browser ,and its file has 644 permission . Perhaps that's why i cann't clone it .
BTW,TBB's proxy works fine . and git's proxy configuration also right . If anyone else wants to know .
My OS is ubuntu, I have some codes located on github.com, everything is ok before, but one day, when I typing:
git pull
I'm asked to input password as usual, and then I get this error.
error: couldn't connect to host while accessing https://ghosert#github.com/ghosert/VimProject.git/info/refs
fatal: HTTP request failed
until I try sudo prefix like:
sudo git pull
It works as before once again. It seems I lost the permission on accessing https when git need it. Anyone has idea on this?
The error you posted doesn't indicate that the problem was permissions.
error: couldn't connect to host while accessing
https://ghosert#github.com/ghosert/VimProject.git/info/refs fatal: HTTP request failed
"HTTP request failed" sounds like a connectivity problem.
I would simply bet that your internet connection failed when you typed it the first time, and was back up when you typed it again, with sudo, which I doubt had any effect on fixing the problem.
Worse, it probably messed up your permissions now, refer to sarnold's answer.
I faced the same problem today and here is my analysis and solution.
I set proxy settings system wide in my chrome browser for some purpose and it seems that it has created some environment variables which are causing my working shell to believe that their is no connectivity as i killed the proxy server when the job was finished. The env variables were not removed.
Check if your env has some unnecessary variables set.
env --this command will show all the env variables set in you shell.
Variables:
http_proxy, https_proxy
Remove them and everything will work.