How to allow gem install from github source on digitalocean server - github

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/

Related

I how to resolve git clone fails in 443

It's my first useing git I want to clone "unfp",
so i use $ git clone https://github.com/UNF/unfp.git
Cloning into 'unfp'...
fatal: unable to access 'https://github.com/UNF/unfp.git/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443
but it show the error
I need your help.
you may have to setup SSO/SSH for authentication

git clone is throwing repository not found error

While trying to clone my private repository, I'm getting the following error
fatal: repository 'https://github.com/kefitech/qp-guard.git/' not found
I have done some googling but unable to solve the issue.
Steps completed
1. config --global user.name and password is set using terminal (windows cmd)
2. git remote -v
git remote -v is returning an error:
fatal: not a git repository (or any of the parent directories): .git
So, tried set the remote URL to my repository using the command:
git remote set-url origin https://<my-user>#github.com/<my-org>/qp-guard.git
Bur this also returning the same error returned by git remote -v command
Please note that:
1. I'm a collaborator
2. I can clone any public repos
3. I have not used git client (terminal, cmd) for a long time but it was working before.
Looking forward to any pointers to solve this issue.

Failed to connect to github.com port 443: Time out

When try to clone a project using the git clone command I got this following error message.
Failed to connect to github.com port 443: Time out
DDoS attack check this link https://status.github.com/
The connectivity problems have been identified as a DDoS attack. We're working to mitigate now.
Make sure that you have used
$ git remote add origin git#github.com:**yourname**/learngit.git
to connect your local repository to github.
If you find the following error:
fatal: remote origin already exists.
Then write the following statement in your git bash.
$ git remote rm origin
then write again to re-connect your repository to GitHub.
$ git remote add origin git#github.com:**yourname**/learngit.git
If the above steps can not help you, there must be some ssh errors I think.

bower - fatal: unable to connect to github.com

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.

Setting up new github repository - unknown switch `u'

I am trying to setup a new repository on my existing GitHub account.
I followed the steps circled here:
When I run the command git push -u origin master, I get the following error:
error: unknown switch `u'
Any ideas as to the issue? Doing a Google search for this error didn't seem to cough-up anything useful.
It seems your git client is too old. Try to update it to most recent version:
http://git-scm.com/
Ignore the error: unknown switch `u'
Try what they say here, http://help.github.com/create-a-repo/
$ git push origin master
I believe that this:
$ git push -u origin master
...is equivalent to:
$ git push origin master
$ git config --add branch.master.remote origin
$ git config --add branch.master.merge refs/heads/master
So if you're running an older version of Git that doesn't support -u for git push, run that group of 3 commands instead.