{"action":"created","issue":{"url":"https://api.github.com/repos/exercism/cli/issues/201","labels_url":"https://api.github.com/repos/exercism/cli/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/exercism/cli/issues/201/comments","events_url":"https://api.github.com/repos/exercism/cli/issues/201/events","html_url":"https://github.com/exercism/cli/issues/201","id":97762575,"number":201,"title":"Trouble downloading exercism CLI on Mac OS X","user":{"login":"ghost","id":10137,"avatar_url":"https://avatars.githubusercontent.com/u/10137?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost","html_url":"https://github.com/ghost","followers_url":"https://api.github.com/users/ghost/followers","following_url":"https://api.github.com/users/ghost/following{/other_user}","gists_url":"https://api.github.com/users/ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost/subscriptions","organizations_url":"https://api.github.com/users/ghost/orgs","repos_url":"https://api.github.com/users/ghost/repos","events_url":"https://api.github.com/users/ghost/events{/privacy}","received_events_url":"https://api.github.com/users/ghost/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/exercism/cli/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/exercism/cli/milestones/3","html_url":"https://github.com/exercism/cli/milestones/2.2.2","labels_url":"https://api.github.com/repos/exercism/cli/milestones/3/labels","id":1242876,"number":3,"title":"2.2.2","description":"","creator":{"login":"Tonkpils","id":1507561,"avatar_url":"https://avatars.githubusercontent.com/u/1507561?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonkpils","html_url":"https://github.com/Tonkpils","followers_url":"https://api.github.com/users/Tonkpils/followers","following_url":"https://api.github.com/users/Tonkpils/following{/other_user}","gists_url":"https://api.github.com/users/Tonkpils/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonkpils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonkpils/subscriptions","organizations_url":"https://api.github.com/users/Tonkpils/orgs","repos_url":"https://api.github.com/users/Tonkpils/repos","events_url":"https://api.github.com/users/Tonkpils/events{/privacy}","received_events_url":"https://api.github.com/users/Tonkpils/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2015-08-05T21:55:12Z","updated_at":"2015-10-14T18:14:44Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-07-28T17:50:58Z","updated_at":"2015-10-14T18:14:44Z","closed_at":"2015-10-14T18:14:44Z","body":"I use Mac OS X.  I was trying to install the CLI using the instructions on http://help.exercism.io/installing-the-cli-on-mac.html and I ran into a few issues.  I tried several methods, with some working, and some not.\r\n\r\n## Method 1: Homebrew (not working)\r\nI first tried the homebrew method:\r\n```\r\nbrew tap homebrew/binary\r\nbrew install exercism\r\n```\r\n\r\nHowever, I received the following output from `brew install exercism`:\r\n```\r\nError: No available formula for exercism\r\nSearching formulae...\r\nSearching taps...\r\n```\r\n\r\nWhen I searched for the formula, I got the following output:\r\n```\r\nmanuisfunny>brew search exercism\r\nNo formula found for \"exercism\".\r\nSearching pull requests...\r\nClosed pull requests:\r\nexercism: import from homebrew/binary (https://github.com/Homebrew/homebrew/pull/41699)\r\nexercism: 1.3.0 - cli to fetch and submit code at http://exercism.io/ (https://github.com/Homebrew/homebrew/pull/24469)\r\n```\r\n\r\n## Method 2: Installation Script (not working)\r\nI downloaded and ran the installation script:\r\n```\r\nmanuisfunny>curl -O https://raw.githubusercontent.com/exercism/cli-www/master/public/install\r\nmanuisfunny>./install \r\nDownloading https://github.com/exercism/cli/releases/download/v2.2.0/exercism-mac-64bit.tgz...\r\ninstall: failed to download https://github.com/exercism/cli/releases/download/v2.2.0/exercism-mac-64bit.tgz\r\ntar: exercism: Not found in archive\r\ntar: Error exit delayed from previous errors.\r\ninstall: failed to extract exercism\r\n```\r\n\r\n## Method 3: Manually Downloading CLI via curl (worked after adding options)\r\nSo I used `curl` to try to download it using the url https://github.com/exercism/cli/releases/download/v2.2.0/exercism-mac-64bit.tgz, and I got the 302 redirect to an Amazon S3 url:\r\n```\r\nmanuisfunny>curl https://github.com/exercism/cli/releases/download/v2.2.0/exercism-mac-64bit.tgz > exercism-mac-64bit.tgz\r\n```\r\n\r\nHowever, the tgz file only had the HTML code saying it was being redirected to an Amazon S3 URL:\r\n```\r\n<html><body>You are being <a href=\"https://s3.amazonaws.com/github-cloud/releases/11870975/dd9421bc-1cc0-11e5-9fde-d6559746b6b6.tgz?response-content-disposition=attachment%3B%20filename%3Dexercism-mac-64bit.tgz&amp;response-content-type=application/octet-stream&amp;AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&amp;Expires=1438102720&amp;Signature=%2F%2FXC0wY6ad2LDft61YGSgya2anI%3D\">redirected</a>.</body></html>\r\n```\r\n\r\nI added the -L option so curl would follow the 302 redirect:\r\n```\r\nmanuisfunny>curl -L https://github.com/exercism/cli/releases/download/v2.2.0/exercism-mac-64bit.tgz > exercism-mac-64bit.tgz\r\n```\r\n\r\nHowever, the output was an error about SSL verification:\r\n```\r\ncurl: (51) SSL: certificate verification failed (result: 5)\r\n```\r\n\r\nSo I added the -k option to ignore the certificate verification, and I was able to download it:\r\n```\r\nmanuisfunny>curl -L -k https://github.com/exercism/cli/releases/download/v2.2.0/exercism-mac-64bit.tgz > exercism-mac-64bit.tgz\r\n```\r\n\r\nI was then able to unzip the exercism-mac-64bit.tgz file and install it to my home bin directory.\r\n\r\n### Method 4: Modify Install Script For 302 Redirect & Certificate Ignore (worked, but maybe incorrect)\r\nAfter succeeding with a curl command that required following redirection and ignoring SSL certificate verification, I tried modifying the install script.  \r\n\r\nI'm not sure if this is correct, but looking at the install script, I saw that it uses curl or wget, whichever it finds first.  Looking in the download() method, it executes a curl/wget command to download the tgz CLI file (https://github.com/exercism/cli-www/blob/master/public/install#L148)[https://github.com/exercism/cli-www/blob/master/public/install#L148].\r\n\r\nI got the installation script to work by adding the redirect & ignore certificate options for curl (-L -k) and wget (-L --no-check-certificate):\r\n```\r\ndownload() {\r\n  case \"$DOWNLOADER\" in\r\n    curl) curl -s -L -k --location \"$@\";;\r\n    wget) wget -L --no-check-certificate --output-document=- \"$@\";;\r\n  esac ||\r\n  fail \"failed to download $*\"\r\n}\r\n```\r\n\r\nHowever, I don't know if this is the correct solution.  I'm also not sure if I'm the only one having this issue with installing the CLI, possibly due to a misconfiguration of my local machine.\r\n\r\n### Method 5: Simply Download CLI via Web Browser (worked perfect)\r\nSo, I don't think this entire issue is a big deal, because I could easily download the CLI exercism-mac-64bit.tgz file via my chrome browser using the GitHub release page, [https://github.com/exercism/cli/releases/tag/v2.2.0](https://github.com/exercism/cli/releases/tag/v2.2.0).\r\n\r\n## Conclusion\r\nSo I was able to install the CLI using some methods, and not others.  I'm not sure if it's just the way my machine is setup, or if other users have had the same issue.  I didn't find other issues with the same problems.\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/exercism/cli/issues/comments/148142218","html_url":"https://github.com/exercism/cli/issues/201#issuecomment-148142218","issue_url":"https://api.github.com/repos/exercism/cli/issues/201","id":148142218,"user":{"login":"kytrinyx","id":276834,"avatar_url":"https://avatars.githubusercontent.com/u/276834?v=3","gravatar_id":"","url":"https://api.github.com/users/kytrinyx","html_url":"https://github.com/kytrinyx","followers_url":"https://api.github.com/users/kytrinyx/followers","following_url":"https://api.github.com/users/kytrinyx/following{/other_user}","gists_url":"https://api.github.com/users/kytrinyx/gists{/gist_id}","starred_url":"https://api.github.com/users/kytrinyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kytrinyx/subscriptions","organizations_url":"https://api.github.com/users/kytrinyx/orgs","repos_url":"https://api.github.com/users/kytrinyx/repos","events_url":"https://api.github.com/users/kytrinyx/events{/privacy}","received_events_url":"https://api.github.com/users/kytrinyx/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T18:14:44Z","updated_at":"2015-10-14T18:14:44Z","body":"We've updated the installation instructions for homebrew.\r\n\r\nWe're also working on overhauling the installation instructions on the site to make the options seem less overwhelming and less confusing.\r\n\r\nWith the fix to homebrew, I think this issue is solved."}}