Rehan
Unable to Fetch Tagged Release Artifact from Private Git Repo in Nerves Project
Hi everyone,
I’m facing an issue in my Nerves project where Mix cannot fetch a dependency from a private Git repository, even though:
-
I have access to the repo
-
The URL is correct
-
The tag exists (verified manually)
-
I can clone the repo and checkout the tag locally without any issues
Most Liked
fhunleth
I don’t think you have a choice with GitHub. I’m pretty sure HTTPS is the only option for downloading releases artifacts. At least, I couldn’t find any information about using SSH except for git access, and release artifacts aren’t stored in git.
If you know a way for using SSH, you’re welcome to file an issue with a pointer to the documentation. The code for downloading archives isn’t that large, and you could probably prototype something that shells out to commandline ssh as a proof of concept.
fhunleth
In your Nerves system’s mix.exs, look in the :artifact_sites. For private repositories, you need to use :github_api rather than :github_release. The site spec should look something like:
{:github_api, “#{@github_organization}/#{@app}”, tag: “v#{@version}”}
Hopefully you’ll see the line in the mix.exs, but let me know if you need more details.
Also, your timing is pretty good, since I just ran into this as well when converting a public repo to private and forgetting about the site update.
If you don’t mind switching your :nerves dependency to point to the main branch on GitHub, you can try out my recent changes that improve the error message and fix some issues in that area. In fact, if you’re ok with try out some new code, I’d be curious if my recent updates fix your issue or would have helped you resolve it on your own.
Thanks for posting about this.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









