This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-23
Channels
- # announcements (16)
- # asami (4)
- # babashka (49)
- # beginners (70)
- # calva (25)
- # clojars (3)
- # clojure (40)
- # clojure-europe (82)
- # clojure-france (15)
- # clojure-gamedev (16)
- # clojure-nl (2)
- # clojured (7)
- # clojurescript (13)
- # conjure (11)
- # cursive (4)
- # data-science (12)
- # datalevin (2)
- # figwheel-main (5)
- # gratitude (5)
- # honeysql (5)
- # hyperfiddle (4)
- # jobs (4)
- # joyride (3)
- # lsp (10)
- # malli (2)
- # missionary (14)
- # nbb (2)
- # off-topic (3)
- # pathom (16)
- # rdf (5)
- # releases (4)
- # sci (35)
- # shadow-cljs (16)
- # tools-deps (22)
- # xtdb (7)
Can tools deps check out private github repos with a personal access token? Specifically, deps.edn has <mailto:[email protected]|[email protected]>:… dependencies, how can I use a personal access token in github actions for tools deps to find the dependencies?
If you can use git clone outside the Clojure CLI, then it should work
So solve that problem first
The CLI is just shelling out to git
Some of that stuff is set up for you in gh actions
The checkout thing works with a token, but I’m not sure how to combine it with the tools deps step
been a while since i used a token - what does that look like? does it get passed on the command line or is it ambient somehow
I’m not entirely sure 😅 With the checkout action you just specify the token. I think you can use it as a password with your username. Anyway, I got my action pipeline working with an ssh key 👍
Are you sure a token is needed? If an action is within the scope of the current repository, a GITHUB_TOKEN is automatically created for the GitHub action by GitHub. Or you can set a GITHUB_TOKEN environment variable in the repository or the organisation that repository belongs too, usually if you need to update or otherwise affect another repository/ organisation or user.
"Bumping" this because I see it was already discussed but I'm not quite sure I'm clear on an answer, at least for my situation.
I'm trying to use clj
from a github action in a private repo that has a dependency on another private repo in the same organization. I'm using an oldish version of https://github.com/DeLaGuardo/setup-clojure (v3.5).
Getting the following error:
Unable to clone /home/runner/.gitlibs/_repos/github.com/my/proj
fatal: could not read Username for '': terminal prompts disabled
Is there something I need to do with the GITHUB_TOKEN (that github actions set)? Do I need to clone a repo using the token as the password, and possibly set git to use caching?
(Just wondering if there's a quick fix I'm missing before I start spamming changes to my workflow yml since I don't currently it setup to run locally)Would this be a case of using clojure
, not clj
as clj
uses rlwrap
which expects a terminal?
I think I might need to use the configure_git
option with https://github.com/marketplace/actions/private-actions-checkout, attempting that now
Ok I got it working, this is what worked for me. After creating a secret for the organization that has a read-only personal access token, I put this in the github hactions yaml:
...
jobs:
build:
...
- name: Use github personal access token to authenticate private repos
run: git config --global --add url.":${{ secrets.ORG_PERSONAL_ACCESS_TOKEN }}@github.com/".insteadOf " "
The github_token that GitHub automatically creates can only be used for the current repository, so as you rightly have done an org (or user) token is required to access other repositories (that are not public)
I assume to access a private repo you can create a token on the private repo and set that as the GITHUB_TOKEN value from the GitHub action that is accessing it (in theory)
"Bumping" this because I see it was already discussed but I'm not quite sure I'm clear on an answer, at least for my situation.
I'm trying to use clj
from a github action in a private repo that has a dependency on another private repo in the same organization. I'm using an oldish version of https://github.com/DeLaGuardo/setup-clojure (v3.5).
Getting the following error:
Unable to clone /home/runner/.gitlibs/_repos/github.com/my/proj
fatal: could not read Username for '': terminal prompts disabled
Is there something I need to do with the GITHUB_TOKEN (that github actions set)? Do I need to clone a repo using the token as the password, and possibly set git to use caching?
(Just wondering if there's a quick fix I'm missing before I start spamming changes to my workflow yml since I don't currently it setup to run locally)