leifericf

leifericf

Mix fails to clone from GitHub over HTTPS via 'mix deps.get'

I have successfully cloned this repository over ssh:

git clone irleif@github.com:ueberauth/ueberauth_example.git

When I try to get dependencies with mix deps.get, I get this error:

* Updating oauth (https://github.com/tim/erlang-oauth.git)
fatal: unable to access 'https://github.com/tim/erlang-oauth.git/': Couldn't connect to server

I can see that ueberauth_example is including erlang-oauth in its mix.exs, in this way:

{:oauth, github: "tim/erlang-oauth"}

The dependency doesn’t specify https or ssh, so I presume mix is defaulting to https.

However, I am able to clone the repo just fine manually over ssh, like this:

git clone irleif@github.com:tim/erlang-oauth.git

Is it somehow possible to make mix deps.get use ssh for cloning instead of https?

Marked As Solved

leifericf

leifericf

Aha! I recently enabled two-factor authentication, which might be why this is happening:

If you have enabled two-factor authentication, or if you are accessing an organization that uses SAML single sign-on, you must provide a personal access token instead of entering your password for HTTPS Git. (Source)

You can create a personal access token and use it in place of a password when performing Git operations over HTTPS with Git on the command line or the API. (Source)

I wasn’t aware of that until now.

Since GitHub recommends HTTPS over SSH, I’ll get that working instead.

Edit:

So, I fixed two-factor authentication, and the problem still persisted. After much head-scratching, I decided to try in Apple’s “Terminal” app, instead of iTerm.

Lo and behold; cloning over HTTPS worked like a dream.

After some more digging, I found the culprit: The app “Little Snitch” (network filter) was blocking iTerm. Adding an exception to the network filter was all I needed to do :laughing:

Where Next?

Popular in Questions Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement