简体   繁体   English

如何在rebar.config中从github设置私人部门?

[英]How to setup private deps from github in rebar.config?

Just wondering if it is possible to setup private deps in rebar.config? 只想知道是否可以在rebar.config中设置私人部门? Especially if this deps from github. 特别是如果这来自github。

Any ideas? 有任何想法吗?

I had the opposite solution, I was using git:// and it didn't work so I switched to https:// . 我有相反的解决方案,我使用的是git:// ,但没有用,所以我切换到https://

Original: {PACKAGE_NAME, {git, "git://github.com/ORG/PRIVATE_REPO.git", {branch, "MY_BRANCH"}}} 原文: {PACKAGE_NAME, {git, "git://github.com/ORG/PRIVATE_REPO.git", {branch, "MY_BRANCH"}}}

Working: {PACKAGE_NAME, {git, "https://github.com/ORG/PRIVATE_REPO", {branch, "MY_BRANCH"}}} 工作: {PACKAGE_NAME, {git, "https://github.com/ORG/PRIVATE_REPO", {branch, "MY_BRANCH"}}}

Both rebar3 compile and rebar3 shell now work fine. 现在, rebar3 compilerebar3 shell可以正常工作。 This is on macOS Mojave v10.14.2, Terminal v2.9.1, rebar3 v3.8.0, Erlang/OTP 21, ERTS 10.2.3. 这是在macOS Mojave v10.14.2,终端v2.9.1,rebar3 v3.8.0,Erlang / OTP 21,ERTS 10.2.3上。 I'm using locally stored Github credentials specifically a Personal Access Token because I have to use 2FA for work. 我使用的是本地存储的Github凭据,尤其是个人访问令牌,因为我必须使用2FA进行工作。

There is no solution, all you have to do it to specify git (not https) of the dep you want to use. 没有解决方案,您只需指定要使用的dep的git(而不是https)即可。 Then execute ./rebar get-deps and you good to go. 然后执行./rebar get-deps ,您一切顺利。

Important: if you use iTerm and it doesn't work for you - Terminal.app is your friend. 重要提示:如果您使用iTerm,但对您不起作用-Terminal.app是您的朋友。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM