How to resume an HTTP download served by Apache and svn module? - apache

I 'm using Collabnet Subversion server 1.7.6(on Windows); I store large files(30M+) in SVN repository and serve them via the bundled Apache HTTP server(2.2.22).
I find that download of SVN-served files does not support resume. In HTTP protocol term, the client requests Range: xxx- in HTTP header, but the server does not respond with HTTP header Content-Range: xxx-yyy , so the client has to download from the first byte of a file.
I also try http download resume on Apache website's svn server.
wget -c http://svn.apache.org/repos/asf/subversion/branches/1.7.x/CHANGES
I press Ctrl+C in the middle of download, then wget -c again, the same result.
Is there any workaround for this problem?

Related

Reverse SSH tunneling with not localhost

I have local computer and remote server. Remote server is isolated and is only accessible with this computer. I want to connect to site from server, let it be https://example.com/site
I tried to make a tunnel via ssh -R 6761:example.com:80 remote-server. But when I am trying to use wget http://localhost:6761/site on the remote server - it doesn't work and show 404 whilst wget http://example.com/site working well on local computer.
What I am doing wrong?
You cannot tunnel HTTP that way.
The name of the server you are trying to reach will be included in the request (the Host header), but it will most likely only listen to example.com, not localhost.
You will need to set up a HTTP Proxy (Forward Proxy) on your local machine and tell your http client(s) to use that. (How depends on the client.)

SSL: get artifact on Nexus using HTTPS

I have a server that runs Nexus, I can get access to Nexus and download artifacts via https (browser) without problem.
Now I want to get the artifact using wget via https:
wget https://195.20.100.100:8081/repository/myrepo/com/myrepo/program/1.0-SNAPSHOT/program.tar.gz
and it tells me :
WARNING: cannot verify 195.20.100.100's certificate, issued by ‘/C=US/ST=Unspecified/L=Unspecified/O=Sonatype/OU=Example/CN=*.195.20.100.100’:
Self-signed certificate encountered.
Proxy request sent, awaiting response... 401 Unauthorized
Authorization failed.
I want to know the exact steps I have to do?
Thanks in advance.
This isn't a Nexus Repository Manager issue per se, I believe you just need to do something akin to the answer in this post: wget, self-signed certs and a custom HTTPS server

artifactory pro registry docker image

I am trying out the 30 day trial version of the artifactory-registry docker image to evaluate the docker repository for our internal use. I am following the documentation https://www.jfrog.com/confluence/display/RTF/Running+with+Docker
After I run the docker image I am able to access the UI on port 8081, however When I try to push an image I get the following error
“The plain HTTP request was sent to HTTPS port”
Heres how I deploy the image
sudo docker pull mysql
sudo docker tag mysql localhost:5002/mysql
sudo docker push localhost:5002/mysql
Also the documentation says that artifactory could be accessed on the following URLS
http://localhost/artifactory
http://localhost:8081/artifactory
https://localhost:5000/v2 (This is mapped to http://localhost:8081/artifactory/api/docker/docker-remote/v2)
https://localhost:5001/v1 (This is mapped to http://localhost:8081/artifactory/api/docker/docker-prod-local/v1)
https://localhost:5002/v1 (This is mapped to http://localhost:8081/artifactory/api/docker/docker-dev-local/v1)
https://localhost:5001/v2 (This is mapped to http://localhost:8081/artifactory/api/docker/docker-prod-local/v2)
https://localhost:5002/v2 (This is mapped to http://localhost:8081/artifactory/api/docker/docker-dev-local/v2)
But I get a 404 trying to access any of the https urls
What am I missing?
This appears to be an NGINX configuration issue (as described here ) with not forwarding HTTPS requests to Artifactory.
Changing the configuration to forward your requests should fix your issue.

wget refuses to download a file over https, but http works fine

If I download a file from an HTTP URL, it is all OK and system("wget -O filename http://www.example.com") downloads the file.
If I try to download a file from a HTTPS URL only (so I cannot reach it using HTTP) using system("wget -O filename https://www.example2.com"), wget gives me an error:
"Impossible to verify the certificate of URL, released by "CERTIFICATE AUTORITY name": Impossible to verify locally the authority of the issuer.
Impossible to establish a SSL connection."
The site doesn't require a password, in fact if I digit "https://www.example2.com/filename" in the browser, it downloads the file.
What should I do?
I want to underline that the browser cannot reach "http://www.example2.com/filename" and it doesn't download the file, but if I digit "https://www.example2.com/filename", the browser downloads the file. So HTTPS only.
I think the --no-check-certificate option is what you are looking for.
Check the HTTPS (SSL/TLS) Options

git push large files fatal remote end hung up unexpectedly - apache proxypassreverse issue

I have just setup git-http-backend on a WS2008 machine using Apache and Basic Auth for pull and push.
I can create a bare repository on the hosting server and clone it down with git clone http://user#server.com/repositories/Test.git
This works fine, I can add files and push them back. That all works great. I thought I had it all working!
I am now trying to put a few of my projects in (C# .net stuff). I first tried just copying the .git directory and putting that on the server which seemed to have issues. So I thought I would create a bare repo, clone it to local machine, copy in files then commit and push back to server. All seems to work until I try and push my sln file. At that point it goes through the compression and writing objects etc but errors with:
error: RPC failed; result=22, HTTP code = 417
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
In the Apache server error Log I have:
fatal: Needed a single revision
fatal: Needed a single revision
The only thing I can see in the access.log is:
192.168.10.96 - - [22/Oct/2010:23:06:06 +0100] "GET /repositories/CodeTest.git/info/refs? service=git-receive-pack HTTP/1.1" 200 153
After this point I can not longer get it to push even if I remove the sln file. I am new to GIT and pretty confused as to what might be happening under the hood here.
Any help or advice would be great.
EDIT so I can create a text file and rename it to test.sln and that works. But if I create a text file and copy the contents of the sln file it will fail again.
EDIT 2
Looks like it is not just SLN files but some of the files within a project / solution. I have a solution that has multiple projects so I choose a single project that only had a few files and no SLN (did have proj file). This also failed.
I am beginning to feel it could be an encoding issue or a line termination with files created by VS2010 or something. Not sure how to test this though.
EDIT 3
It looks like it is large files that can't be pushed. I tried this on both client and server config but it didn't fix it.
EDIT 4
If I do everything on the server it self, create a new repo, clone empty repo, copy all files to new clone, git add and git commit then git push it all works. This would suggest a network or timeout issue. The clone I did was http://user#localhost.
EDIT 5
So it looks like the problem is with my network setup. I have one external IP so all HTTP traffic comes into an Apache Linux box, most of my site is served from there but some uses other boxes so it uses proxy pass reverse to serve the content. I have a subdomain "git.myserver.com" for this. Apache on the GIT server is actually on port 8000, if I open port 8000 on the external firewall and point it directly at the GIT server it works. So I can only assume somewhere in the first apache server it is dieing. just to confirm the fatal error is almost instant, so timeouts seem less likely. Maybe the proxy pass reverse rewrites something, but why it only affects larger files is a mystery.
EDIT 6
in the apache proxy server error.log I get:
[Mon Oct 25 11:41:06 2010] [error] (103)Software caused connection abort: proxy: pass request body failed to 192.168.10.97:8000 (192.168.10.97)
[Mon Oct 25 11:41:06 2010] [error] proxy: pass request body failed to 192.168.10.97:8000 (192.168.10.97) from 62.133.24.54 ()
so it is looking like either the proxy it self fails or something on that machine thinks its bad.
Thanks
FWIW, I had this same error, but then upgraded to git v1.7.7, and the error disappeared.
why don't you just use file shares? You don't need to go over http with git.