Git clone hangs on Receiving objects on MAC OSX 10.12 - ios

I am trying to setup Cocoapods on mac osx 10.12, I have tried to execute this command in terminal it hangs on receiving object :-
cd ~/.cocoapods/repos
GIT_TRACE=1; GIT_CURL_VERBOSE=1 git clone http://github.com/CocoaPods/Specs.git master --verbose
Here is the terminal output:-
Cloning into 'master'...
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.112...
* Connected to github.com (192.30.253.112) port 80 (#0)
> GET /CocoaPods/Specs.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.7.4 (Apple Git-66)
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 301 Moved Permanently
< Content-length: 0
< Location: https://github.com/CocoaPods/Specs.git/info/refs?service=git-upload-pack
< Connection: close
<
* Closing connection 0
* Issue another request to this URL: 'https://github.com/CocoaPods/Specs.git/info/refs?service=git-upload-pack'
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.112...
* Connected to github.com (192.30.253.112) port 443 (#1)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: github.com
* Server certificate: DigiCert SHA2 Extended Validation Server CA
* Server certificate: DigiCert High Assurance EV Root CA
> GET /CocoaPods/Specs.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.7.4 (Apple Git-66)
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 200 OK
< Server: GitHub Babel 2.0
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
< X-GitHub-Request-Id: 69EEB048:2D36F:6AF964:57888CD0
< X-Frame-Options: DENY
<
* Connection #1 to host github.com left intact
POST git-upload-pack (305 bytes)
* Couldn't find host github.com in the .netrc file; using defaults
* Found bundle for host github.com: 0x7fc3d750be30
* Re-using existing connection! (#1) with host github.com
* Connected to github.com (192.30.253.112) port 443 (#1)
> POST /CocoaPods/Specs.git/git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.7.4 (Apple Git-66)
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 305
* upload completely sent off: 305 out of 305 bytes
< HTTP/1.1 200 OK
< Server: GitHub Babel 2.0
< Content-Type: application/x-git-upload-pack-result
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
< X-GitHub-Request-Id: 69EEB048:2D36F:6AFF66:57888CD9
< X-Frame-Options: DENY
<
remote: Counting objects: 747987, done.
remote: Compressing objects: 100% (17/17), done.
Receiving objects: 1% (10862/747987), 2.16 MiB | 437.00 KiB/s
I have seen others questions about this issue here on SO, unfortunately non of there solutions worked.
Update:-
The terminal showed this error after a while:-
* SSLRead() return error -9806/747987), 2.16 MiB | 437.00 KiB/s
* Closing connection 1
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed`

See this answer.
VMware on NAT had this problem for me. Changing it to Bridged
(replicate the state) fixed the issue.

I confirm it's a network issue on my side. I executed this command on a Windows 10 machine:-
git clone http://github.com/CocoaPods/Specs.git master
Then copied the master repo to this directory on the MAC OSX machine using the terminal cp command (normal copy using Finder hangs for hours):-
~/.cocoapods/repos/master
Then finally doing pod init then pod install --verbose on my project directory worked like a charm

Related

Kong: kong-spec-expose plugin cannot load the documentation(302 permanently moved)

I have hard times configuring this kong-spec-expose plugin.It is supposed to automatically configure the routes with Swagger. After some time I managed to configure it but when i try to access the documentation of a certain route it is always giving me the 302 permanently moved.So i tested it with curl and here I will leave a link for the kong plugin and a screenshot of the request..
https://docs.konghq.com/hub/optum/kong-spec-expose/
* Trying 127.0.0.1:8000...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET /api/employee-controller/profile/user/12/base/specz HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Moved Temporarily
< Date: Wed, 11 Jan 2023 09:50:38 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Kong-Response-Latency: 409
< Server: kong/2.8.1
Actually I tried configuring the plugin on multiple routes then on service level but nothing seems to work out.. then tried to analyse where this request is redirected but with no results.

Getting {error,connect_timeout} message while using Hackney

i am using Hackney's erlang rest client. I followed the steps provided in README.md but I am getting the following error:
17> Method = get.
get
18> URL = <<"www.google.com">>.
<<"www.google.com">>
19> Headers = [].
[]
20> Payload = <<>>.
<<>>
21> Options = [].
[]
22>Test = hackney:request(Method, URL,Headers,Payload,Options).
{error,connect_timeout}
I used the same url using curl and wget and both are working. Is there any issue with erlang ssl or issue with tls? I have edited the question for better understanding
EDIT 1 (using curl -vv google.com)
curl -vv google.com
* About to connect() to proxy <<ip>> port 8080 (#0)
* Trying <<ip>>... connected
* Connected to <<ip>> (<<ip>>) port 8080 (#0)
* Proxy auth using Basic with user '<<user>>'
> GET http://google.com HTTP/1.1
> Proxy-Authorization: <<proxy authorization>>
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: google.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 301 Moved Permanently
< Location: http://www.google.com/
< Content-Type: text/html; charset=UTF-8
< Date: Tue, 07 Jun 2016 03:49:43 GMT
< Expires: Thu, 07 Jul 2016 03:49:43 GMT
< Cache-Control: public, max-age=2592000
< Server: gws
< Content-Length: 219
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Age: 2223
<
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
here.
</BODY></HTML>
* Connection #0 to host <<ip>> left intact
* Closing connection #0
Hackney do not apply profile proxy settings automatically, so you should take care of proxy settings yourself.
According to the documentation, you should provide the following options:
{proxy, {Host, Port}} %% if http proxy is used
{proxy_auth, {User, Password}}. %% if proxy requires authentication
What do you get when you use the httpc module to do a request via the Erlang shell.
First start inets:
inets:start().
Then try:
{ok, Response} = httpc:request("https://www.google.com").
or
{ok, Response} = httpc:request("http://www.google.com").
If both of these fail to connect, odds are the issue is not hackney related, but rather an issue of Erlang as a whole.
Your error is not an connect_timeout. You are getting an exception of no match of right hand side value because you are missing the = on your last command.
Just change it to
{ok, StatusCode, RespHeaders, ClientRef} = hackney:request(Method,URL,Headers,Payload,Options).

BadRequest on modified Spring Oauth2 example royclarkson github

I have based on the following example in order to create a secure REST Api: https://github.com/royclarkson/spring-rest-service-oauth
The problem is that when I try to get the token I always get Bad Credentials error.
The code is equal, so my guess is that I'm not doing the access token query properly. Following is my curl:
C:\Users\Javier\Desktop\curl\bin>curl -X POST -vu clientapp:123456 http://localhost:8080/wombee/oauth/token -H "Accept: application/json" -d "password=javi&username=javi&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
* Server auth using Basic with user 'clientapp'
> POST /wombee/oauth/token HTTP/1.1
> Host: localhost:8080
> Authorization: Basic Y2xpZW50YXBwOjEyMzQ1Ng==
> User-Agent: curl/7.47.1
> Accept: application/json
> Content-Length: 107
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 107 out of 107 bytes
< HTTP/1.1 400 PeticiĆ³n incorrecta
< Server: Apache-Coyote/1.1
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: 0
< X-Frame-Options: DENY
< Cache-Control: no-store
< Pragma: no-cache
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Fri, 25 Mar 2016 10:52:01 GMT
< Connection: close
<
{"error":"invalid_grant","error_description":"Bad credentials"}* Closing connection 0
Silly me, in CustomUserDetailsService I had getPassword method override with a null, that was my problem.

Getting ERR_INSECURE_RESPONSE error before redirecting to ssl page

I have a Rails app on Heroku using Expedited SSL (in case any of that matters).
Now I have permanent forwarding from example.com to https://www.example.com. Occasionally, and I only noticed it on Chrome, when I request the page http://example.com, I get a ERR_INSECURE_RESPONSE error page, then after few seconds, it takes me to the https://www.example.com page and loads just fine.
I ran the inspector for http insecured warnings in console, but nothing. I tried several times to do curl, and on one occasion I got an error.
Bashar:example bashar$ curl -v http://example.com
* Rebuilt URL to: http://example.com/
* Hostname was NOT found in DNS cache
* Trying xx.xx.xx.xx...
* Connected to example.com (xx.xx.xx.xx) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.37.0
> Host: example.com
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
Bashar:example bashar$ curl -v http://example.com
* Rebuilt URL to: http://example.com/
* Hostname was NOT found in DNS cache
* Trying xx.xx.xx.xx...
* Connected to example.com (xx.xx.xx.xx) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.37.0
> Host: example.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Cache-Control: max-age=900
< Content-Type: text/html
< Location: https://www.example.com
* Server Microsoft-IIS/7.5 is not blacklisted
< Server: Microsoft-IIS/7.5
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Tue, 11 Aug 2015 09:15:46 GMT
< Content-Length: 0
< Age: 1
< Connection: keep-alive
<
* Connection #0 to host example.com left intact
I've read several discussions about the topic, but didn't find one exactly like this. Any idea?
I'm not sure if there is another, or better solution. However I found this answer by Brian Heroku SSL on root domain
to move from GoDaddy to DNSimple to do the trick. Can't see the problem anymore, and even better, the site works with and without www, and with http and https. Seems t

iOS payload, but nothing to deliver to (missing device_tokens, tags, segments, or aliases)

I am doing background download for my app but I am getting
iOS payload, but nothing to deliver to (missing device_tokens, tags, segments, or aliases)
when I insert this in terminal:
curl -v -X POST -u "<appKey>:<master key>" -H "Content-type: application/json" -H "Accept:
application/vnd.urbanairship+json; version=3;" --data '{"audience":"all", "device_types" : ["ios"], "notification": {"ios": {"content-available":true, "sound": "default", "badge": 1, "message": "Hi there!", "priority":5}}}' https://go.urbanairship.com/api/push/
I wonder if the curl codes has any format mistakes in it.
Terminal return:
* Hostname was NOT found in DNS cache
* Trying 23.74.208.46...
* Connected to go.urbanairship.com (23.74.208.46) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate: *.urbanairship.com
* Server certificate: Cybertrust Public SureServer SV CA
* Server certificate: Baltimore CyberTrust Root
* Server auth using Basic with user '<codes>'
> POST /api/push/ HTTP/1.1
> Authorization: Basic <codes>
> User-Agent: curl/7.37.1
> Host: go.urbanairship.com
> Content-type: application/json
> Accept:
> application/vnd.urbanairship+json; version=3;
> Content-Length: 143
>
* upload completely sent off: 143 out of 143 bytes
< HTTP/1.1 400 Bad Request
* Server gunicorn/0.14.5 is not blacklisted
< Server: gunicorn/0.14.5
< Vary: Authorization, Cookie
< X-Frame-Options: SAMEORIGIN
< Content-Type: text/html; charset=utf-8
< Date: Wed, 19 Nov 2014 02:19:02 GMT
< Transfer-Encoding: chunked
< Connection: close
< Connection: Transfer-Encoding
< Set-Cookie: SRV=s0196; path=/
<
* Closing connection 0
iOS payload, but nothing to deliver to (missing device_tokens, tags, segments, or aliases)
First, you should not post your credentials for all to see. This could allow anyone to send notifications to your app users!
Second, the problem appears to be that within your "ios" section you need to specify your audience by means of device tokens, tags, segments, or aliases. These are mechanisms UA gives you to identify which users should receive the notification.

Resources