gnutls_handshake() failed: Close notify - Docker and Only on one network - node.js

Just came across a really odd problem.
I have been doing some work with Docker images and Dockerfile which included some bower install commands. It was all fine until today was the day I got a new broadband provider (Virgin Media in the UK) and all of a sudden i start getting errors whist trying to build images such as
bower ember#1.13.12 ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/components/ember.git", exit code of #128 fatal: unable to access 'https://github.com/components/ember.git/': gnutls_handshake() failed: Close notify
Additional error details:
fatal: unable to access 'https://github.com/components/ember.git/': gnutls_handshake() failed: Close notify
I then tried by tethering to my mobile phone (4g) and it works perfectly fine. So there are many commands in the bower.json and it seems to randomly fail at any.
Even a simple command like cloning a repo from within the Dockerfile , fails when i connect to my new network but works with other networks.
Oddly enough if i use the git clone command on my Mac or even the bower install with the exact same repo it all works fine (with new network and 4G) however as soon as I try to run via Dockerfile I get the errors.
I have checked my router and cannot really see if it is a router issue what it could possibly be. The WIFI signal is 200Mbs so it surely can't be that.

The error is raised because of the protocal used by git. Just replace 'https' with 'http', it works for my case.

Related

git clone fatal error - repository 'https' does not exist

I am trying to get a git clone of a github repo, namely odoo (formerly OpenERP). When trying to run the git clone command in Centos 8, I get the following error:
error as shown in terminal
I am running this command in root. I have tried running it as sudo.
The machine is running in a VPS, and seems to have https resolving issues. I can't ping google through https for instance. I also checked, and there is no firewall causing issues. https ping attempt
How do I best approach this? I'm not sure if it is a name server issue or the like.
Try git clone https://github.com/odoo/odoo.git --depth 1 -b 13.0
Ping requires only hostname, not a URL. Try pinging ping google.com

Jenkins Error 128 / Git Error 403: Jenkins can't connect to my Bitbucket repository

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.

Error occurring in localhost but not on my website even though the code is the same - how?

I am getting an error on a form submit in localhost, but no errors on my live website.
The error is: Error: Can't set headers after they are sent.
I ran git diff to see the differences between my remote and local repos, and there were some since I had made a couple of changes. Those changes were: adding a custom bootstrap configuration (I wanted to change the base font from 14 to 18px) and uninstalling New Relic, an npm package for analytics. I am not sure how any of that would have caused the error, I am just trying to explain thoroughly.
My remote git repository is the code behind my live site, which is not getting this error, so I decided to make my local files match my remote, so I ran:
git fetch origin
git reset --hard origin/master
git clean -f
and then ran git diff again and there were no differences this time. That is what is puzzling to me. It seems like there should be no difference. Thanks in advance for any tips.
As a result of some earlier testing I had created duplicate usernames, and this error is only occurring when logged in with one of the duplicates, which only exist in my local DB. That explains why I was getting this error in localhost and not in my live site.

Git push fails when modified files are included in push, but succeeds when added or deleted files

I've been using git for a few months and have never run into problems. I met my match today. I have a system running Ubuntu 10.10 (new system). I put my keys in place to access the server, and can ssh in just fine. I cloned my repos just fine. I can push added / deleted files just fine. However, when I try to push modified files, the push doesn't finish. It hangs on the last line (Starts with "Total")
If I wait 15 minutes or so it gives me these errors:
Write failed: Broken pipe
Fatal: The remote host hung up unexpectedly
I've tried pushing as both regular user and sudo user. When I add a verbose flag to the push, nothing.
I think this is an SSH error, but it is completely puzzling me. Can anyone help?
I'm just going to run a list of ideas here.
Is this plain SSH or are you using e.g. -o ProxyCommand or another tunnel of sorts?
I'd check the version of the client, since you report being able to do the same correctly from other machines.
I'd also try creating a bundle from the client to eliminate the transport from the analysis.
I'd check file permissions (and out-of-space/quota/temp space for the user) on the server. Are you using the same user that works for other clients?
You could look at a problem in the garbage collect step on the server (by using git config to make sure it doesn't happen).
Did you try other protocols (git-daemon or smart http server?)
Could something be up locally (like repository on synch NFS, or dropbox or...)?

Why "git pull" command over https from github repository need "sudo" as prefix?

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.

Resources