bower - fatal: unable to connect to github.com - github

After upgrading ember-cli on my mac (Yosemite 10.10.2)
npm uninstall -g ember-cli
npm cache clean
bower cache clean
npm install -g ember-cli#0.1.12
....
or maybe after Yosemite upgrade to 10.10.2,
or after upgrade my Java to v8-32...
my bower doesnt work anymore.
If I try:
bower list
I get an error:
bower check-new Checking for new versions of the project dependencies..
bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git", exit code of #128
Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=Operation timed out
But if I execute:
git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
it works:
git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
c6006a11515c756d115bb5209103a22c2e9554a0 refs/heads/master
929777f8b5c60db3120712c7328f5debdf74a0cd refs/tags/0.0.1
055d50f770ad333e7ead10ecb04605f951e2435b refs/tags/0.0.2
9defa2c59df38dcc334d6c1cc266075c04c2a4f6 refs/tags/0.0.3
a925b8fc428829ea3599e66eb0e6353726426356 refs/tags/0.0.4
c6006a11515c756d115bb5209103a22c2e9554a0 refs/tags/v0.1.0
Also every git clone git:// or http:// works and I can access 192.30.252.128 over http.
Only in combination with bower it doesnt work.
With npm I have also no problems.
What Im trying was to uninstall and reinstall bower. But this doesnt solve the problem.
Next try:
.bowerrc
with:
{
"directory": "bower_components",
"analytics": false,
"proxy": "",
"https-proxy": ""
}
Next try:
.gitconfig
[url "https://"]
insteadOf = git://
With the result:
Additional error details:
fatal: unable to access 'https://github.com/furf/jquery-ui-touch-punch.git/': Failed to connect to github.com port 443: Operation timed out
Iam also try:
ssh -T git#github.com
to add github.com under known_hosts.
The strange thing is:
ssh -T git#github.com
ssh: connect to host github.com port 22: Operation timed out
Try it again:
ssh -T git#github.com
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
So sometimes it works and sometimes not. A look at https://status.github.com/
shows that everything is fine from github.
But why I get sometimes a timeout?
Maybe a DNS Server lag? Every other connections are fine.
Also a ping is looking fine:
The badest time was
time=100.173 ms
over minutes and I start parallel the bower install command with same timeout as before.... but the ping was going on and only with 100ms.
Im also exit my firewalls with no result.
I have no proxy configurred.
Any idea?
Update 09/02/2014
Im currently in Hamburg and here, the bower install works fine. So it is not a problem of my system installation.
Update 12/02/2014
After being back at home, it also works without any changes.
Strange!

From this npm thread: https://github.com/npm/npm/issues/5257#issuecomment-60441477
Try dumping the following into your .gitconfig
[url "https://"]
insteadOf = git://
[url "https://github.com"]
insteadOf = git#github.com
Since I'm on a Windows machine, I also had to ensure that c:\users\me\.gitconfig and the one on my modified home drive h:\.gitconfig were the same.

Run
git config --global url."https://".insteadOf git://
saves lot of pain specially if one is behind the firewall.

One Solution for Requiring Modules
This solution has not been tested against bower list, however, (like in my situation) you may be impeded to bower installs due to local, environmental policies. Here's what allowed me to leverage Bower -- saving me from a multitude of headaches:
...
"dependencies": {
"angular": "https://code.angularjs.org/1.3.15/angular.js",
"jquery": "https://github.com/jquery/jquery.git#~2.1.4",
"moment": "https://github.com/moment/moment.git",
"underscore": "https://github.com/jashkenas/underscore.git#~1.8.3"
}
...
OR,
bower install https://domain.ext/path/to/asset.ext -S
You may be getting the error, fatal: unable to connect to github.com: while trying to install -- this is because in some environments bower cannot resolve the git:// protocol. However, it will resolve http(s):.
My suggestion:
Search Bower for a package,
Navigate to the git repository,
Copy the https git clone URI,
bower install https://.../author/module.git --save
This will save (--save / -S) the package to your bower.json file with the #~n.n.n notation for the package-version.
Hope this helps you guys as it did I.

Related

Proxmox apt-get update fails

When I type in the bash of the Server apt-get update it fails, I don't know why. The error is:
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 2a01:7e0:0:424::249 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
The apt package manager on the fresh Proxmox host is configured to download packages from Enterprise Repository by default. You must have a paid subscription to use this repo. If you don't have paid subscription you should switch to No-Subscription Repository.
Either delete /etc/apt/sources.list.d/pve-enterprise.list file or comment all lines in this file with #.
Create new file /etc/apt/sources.list.d/pve-no-subscription.list with content:
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
Read about Proxmox package repositories here:
https://pve.proxmox.com/wiki/Package_Repositories
I came across this answer when looking for a solution to similar GPG errors when trying to update Proxmox while running the Debug terminal during a fresh install. This is a rather old question, but I haven't found a better place to give a more detailed answer other than the Proxmox forums.
As Moayad Almalat says above, you need to buy an Enterprise subscription or disable that repository and add the pve-no-subscription repository instead.
This is the easiest one-line command to add the no-sub repo (don't forget to remove or disable the enterprise repo though):
echo "deb [trusted=yes] http://download.proxmox.com/debian/pve $(lsb_release -s -c) pve-no-subscription" > /etc/apt/sources.list.d/pve-no-sub-repo.list
Once those changes are made, you need to make sure your GPG Keys for the new repositories are in place:
wget https://enterprise.proxmox.com/debian/proxmox-release-$(lsb_release -s -c).gpg -O /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -s -c).gpg
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
If you still have GPG issues when trying to run apt update, you can make sure the GPG keys have the proper permissions by using:
chmod +r /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -s -c).gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
Again, as Moayad Almalat mentioned, you can read most of this on the Proxmox wiki here: https://pve.proxmox.com/wiki/Package_Repositories

exit status 128 while cloning the git repository while getting go package from Github location

I want to configure the GoLang GB compiler for the projects in my local. based on the documentation given in the url I am trying to get the gb compiler using the command
its returning status code 128. I am unable to understand whats happening here as there is no reference to resolve this issue.
adding GIT_CURL_VERBOSE=1 or 2 is not helping as its not giving any other valuable details as output.
$ GIT_CURL_VERBOSE=1 go get -u -v github.com/constabulary/gb/...
$ github.com/constabulary/gb (download)
$ # cd .; git clone https://github.com/constabulary/gb
C:\work\GitHub\GoLib\src\github.com\constabulary\gb
Cloning into 'C:\work\GitHub\GoLib\src\github.com\constabulary\gb'...
package github.com/constabulary/gb/...: exit status 128
Still getting the avove output
below is the output when not using -u
$ GIT_TRACE=2 go get -v github.com/constabulary/gb/...
github.com/constabulary/gb (download)
# cd .; git clone https://github.com/constabulary/gb
C:\work\GitHub\GoLib\src\github.com\constabulary\gb
17:20:25.818538 git.c:328 trace: built-in: git 'clone'
'https://github.com/constabulary/gb' 'C:\work\GitHub\GoLib\
src\github.com\constabulary\gb'
17:20:25.867542 run-command.c:626 trace: run_command: 'remote-https'
'origin' 'https://github.com/constabulary/gb'
Cloning into 'C:\work\GitHub\GoLib\src\github.com\constabulary\gb'...
17:20:25.970553 git.c:560 trace: exec: 'git-remote-https'
'origin' 'https://github.com/constabulary/gb'
17:20:25.970553 run-command.c:626 trace: run_command: 'git-remote-
https' 'origin' 'https://github.com/constabulary/gb'
package github.com/constabulary/gb/...: exit status 128
I tried to resolve the issue for a couple of days.
In My configuration I was on organizational GitHub and the codelibrary I was trying to get was from github.com. So I thought that might be causing the issue. But that was not true.
I suspected that there is something wrong with the git configuration. as even Organizational github account was not accessible. I tried a lot of solutions from multiple threads.. nothing worked.
Then I ultimately uninstalled GitHub and tortoise git from My machine and installed it again.
and did the complete git configuration setup on my machine from scratch.
It Worked.
What caused that issue in the first place was identified when I went to uninstall git. Installation date was the date when the issue started. So i suspect that there was some faulty update installed for git unknowingly and that caused this issue.

How to allow gem install from github source on digitalocean server

Hello thank you for reading!
how do i open up and allow github gem source to be run on digitalocean server.
Retrying git clone 'git://github.com/tcocca/acts_as_follower.git'
"/home/DIR/.rvm/gems/ruby-2.3.3/cache/bundler/git/acts_as_follower-325dbadb5c64b190d66abe4d3ec636f4d3716066"
--bare --no-hardlinks --quiet due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command git clone
'git://github.com/tcocca/acts_as_follower.git'
"/home/DIR/.rvm/gems/ruby-2.3.3/cache/bundler/git/acts_as_follower-325dbadb5c64b190d66abe4d3ec636f4d3716066"
--bare --no-hardlinks --quiet in directory /Dir has failed.fatal: unable to connect to github.com: github.com[0:IP]: errno=Connection
refused github.com[1:IP]: errno=Connection refused
Any help on this would be awesome.
Thanks in advance.
The solution was to change the global.
git config --global url.https://github.com/.insteadOf git://github.com/

Can't clone public repo from within Dockerfile

I have the following line in my Dockerfile:
RUN git clone https://github.com/assafg/youtube-remote.git ./youtube-remote
When executing sudo docker build -t 'yremote' .
I get the following error:
Cloning into './youtube-remote'... fatal: unable to access
'https://github.com/assafg/youtube-remote.git/': Could not resolve
host: github.com The command '/bin/sh -c git clone
https://github.com/assafg/youtube-remote.git ./youtube-remote'
returned a non-zero code: 128
Running clone command from command line works fine.
This can happen if your container can't connect to the internet. Possibly because it was started with a weird networking option? Run this command to check default internet connectivity:
docker run ubuntu apt install -y git && \
git clone https://github.com/assafg/youtube-remote.git ./youtube-remote
If that container successfully pulls down the repo, it probably means the first container has a networking problem. Try to restart, or change networking settings.
Docker Network just became a first class citizen in the Docker ecosystem. It's a really fast-moving project. This advice applies to v1.8
This is not a very scientific answer but sometimes docker restart helps especially in cases connected with docker network.

Can't deploy docpad to github using ghpages plugin

When using docpad deploy-ghpages --env static I get the following error:
info: Contribute: http://docpad.org/docs/contribute
info: Plugins: eco, ghpages, livereload, marked, partials
info: Environment: static
info: Deployment to GitHub Pages starting...
info: Generating...
info: Generated 16/18 files in 1.229 seconds
error: Something went wrong with the action
error: An error occured:
Error: exited with a non-zero status code
at ChildProcess.<anonymous> (/home/~NAME~/Documents/websites/test-site-2/node_modules/docpad-plugin-ghpages/node_modules/safeps/out/lib/safeps.js:165:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Socket.<anonymous> (child_process.js:968:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
I've tried making new sites from templates (Bootstrap and Boilerplate) and just deploying those, but I still get the same error.
I have feeling it has something to do with not finding my github repo? Is there a place to check this or input it manually? I have git installed and I set it up to my github.
Tried reinstalling node.js and npm along with docpad with no success.
This may be obvious, but when I had problems like in your description, the issue was that I didn't have the origin set correctly. Try:
git remote -v
and if you aren't seeing your github repo, then
git remote add origin git://github.com/USER/PROJECT.git
Also, another one that can be problematic is getting your ssh keys set-up correctly, so if you have problems beyond this, then check that. Lastly, make sure to set the repository fields correctly in your package.json file (type and url), e.g. (depending on ssh vs https access)
"repository": {
"type": "https",
"url": "git#github.com/NAME.git"
The ghpages plugin uses the git remote config for the source and publishing. It's a clever trick that is not immediately visible to the users. There is no proper error messages either.
check remote repo for publishing
I have blog.git repo for the source, and knoguchi.github.io.git repo for the published pages.
The github.io repo is added to the blog.git repo as a remote repo. I named it pages but it could be anything you like.
Run git remote -v to check the setup. Here is mine. Notice the origin and pages. origin is the usual stuff for the blog.git repo. pages point the github.io repo.
$ git remote -v
origin https://github.com/knoguchi/blog.git (fetch)
origin https://github.com/knoguchi/blog.git (push)
pages https://github.com/knoguchi/knoguchi.github.io.git (fetch)
pages https://github.com/knoguchi/knoguchi.github.io.git (push)
If you don't see your github.io repo there add it. Notice the pages. If you pick other name you will have to set it here.
git remote add pages https://github.com/knoguchi/knoguchi.github.io.git
configure ghpages plugin
Now check docpad.coffee configuration file at the root directory of blog.git. The ghpages plugin requires two lines of configuration. Here is my docpad.coffee. Notice the deployRemote value is pages which matches with the git remote config.
docpadConfig = {
plugins:
ghpages:
deployBranch: 'master'
deployRemote: 'pages'
}
module.exports = docpadConfig