Rijidaru
How to share private code between projects?
I want to share code between my projects by creating a library. Once I’ve create a library, how will I go about adding it to my projects?
If I upload it to gitlab to a private repository, will this be possible?
Or if I keep it locally, how will I include it into each of my projects?
Are there other ways?
Marked As Solved
david_ex
If I upload it to gitlab to a private repository, will this be possible?
Yes, using the :git options: mix deps — Mix v1.20.2 (see also mix deps.get - Error fetching private repo on GitHub using :github option · Issue #3422 · elixir-lang/elixir · GitHub)
Or if I keep it locally, how will I include it into each of my projects?
Using the :path options mix deps — Mix v1.20.2 (see example at https://stackoverflow.com/questions/28185003/using-a-package-locally-with-hex-pm)
Are there other ways?
Umbrella apps
Also Liked
david_ex
Per mix deps.get - Error fetching private repo on GitHub using :github option · Issue #3422 · elixir-lang/elixir · GitHub, this should work:
{:app_name, git: "git@github.com:YOUR_ACCOUNT/app_name.git"}
assuming you have SSH keys set up to connect to your private repo.
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









