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

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
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
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
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
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement