Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #15622 > unrolled thread

Salsa: Setup tokens

Started byc.buhtz@posteo.jp
First post2024-03-19 12:00 +0100
Last post2024-03-19 14:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Salsa: Setup tokens c.buhtz@posteo.jp - 2024-03-19 12:00 +0100
    Re: Salsa: Setup tokens Joost van Baal-Ilić <joostvb+debian-python@uvt.nl> - 2024-03-19 13:40 +0100
      Re: Salsa: Setup tokens Julian Gilbey <julian@d-and-j.net> - 2024-03-19 14:30 +0100

#15622 — Salsa: Setup tokens

Fromc.buhtz@posteo.jp
Date2024-03-19 12:00 +0100
SubjectSalsa: Setup tokens
Message-ID<IjFmk-8BG-13@gated-at.bofh.it>
Hello,

this is not a regular support message. I was not able to find clear 
information in the wiki or somewhere else. Please point me to it if 
exist. My intention is to improve the related wiki pages about it.

The command "salsa create_repo" do not work because of a missing 
SALSA_TOKEN. Technically it is clear to me why this happens. My question 
is how am I supposed to handle that in the context of DPT and its 
policy.

The error message:

     salsa warn: SALSA_TOKEN not set in configuration files. Some 
commands may fail
     salsa warn: Project not created: Error POSTing 
https://salsa.debian.org/api/v4/projects (HTTP 401): Unauthorized 
{"message":"401 Unauthorized"} at 
/usr/share/perl5/Devscripts/Salsa/create_repo.pm line 36.

OK, I logged into Salsa and navigated to "User Settings" -> "Access 
Tokens".
I assume I have to create a "Personal Access Tokens" instead of a "Feed 
Token" or "Incoming mail token"?

Are there any suggestions or recommendations from DPT about the 
"Expiration date"?

What is about "select scopes"? I see 10 unchecked items. They are 
described but it is not totally clear for new users what they are about 
or what the implications are. Any recommendations from DPT about that? 
Just select all?

A more broad question: I never used tokens before. I do use SSH keys 
when accessing Codeberg, GitHub or something else. Are this tokens a 
replacement for SSH keys? Should I prefer one of this two methods?

Thanks in advance
Christian Buhtz

[toc] | [next] | [standalone]


#15624

FromJoost van Baal-Ilić <joostvb+debian-python@uvt.nl>
Date2024-03-19 13:40 +0100
Message-ID<IjGV3-9EV-3@gated-at.bofh.it>
In reply to#15622
Hi Christian,

Thanks for working on the documentation!

Op Tue, Mar 19, 2024 at 10:54:43AM +0000 schreef c.buhtz@posteo.jp:
> Hello,
> 
> this is not a regular support message. I was not able to find clear
> information in the wiki or somewhere else. Please point me to it if exist.
> My intention is to improve the related wiki pages about it.
> 
> The command "salsa create_repo" do not work because of a missing
> SALSA_TOKEN. Technically it is clear to me why this happens. My question is
> how am I supposed to handle that in the context of DPT and its policy.
> 
> The error message:
> 
>     salsa warn: SALSA_TOKEN not set in configuration files. Some commands
> may fail
>     salsa warn: Project not created: Error POSTing
> https://salsa.debian.org/api/v4/projects (HTTP 401): Unauthorized
> {"message":"401 Unauthorized"} at
> /usr/share/perl5/Devscripts/Salsa/create_repo.pm line 36.
> 
> OK, I logged into Salsa and navigated to "User Settings" -> "Access Tokens".
> I assume I have to create a "Personal Access Tokens" instead of a "Feed
> Token" or "Incoming mail token"?
> 
> Are there any suggestions or recommendations from DPT about the "Expiration
> date"?
> 
> What is about "select scopes"? I see 10 unchecked items. They are described
> but it is not totally clear for new users what they are about or what the
> implications are. Any recommendations from DPT about that? Just select all?
> 
> A more broad question: I never used tokens before. I do use SSH keys when
> accessing Codeberg, GitHub or something else. Are this tokens a replacement
> for SSH keys? Should I prefer one of this two methods?

I can answer some of your questions, but not all of them.  What I usually do:

Get a personal access token "somesecret" from the salsa web interface.  Then:

 $ touch ~/.salsa-token
 $ chmod og-r ~/.salsa-token
 $ echo somesecret > ~/.salsa-token
 $ SALSA_TOKEN=`cat ~/.salsa-token`

For some actions, the salsa(1) tool (and/or gitlab on salsa.d.o) seems to need
such a token.  An SSH key is not always enough.

HTH, Bye,

Joost

[toc] | [prev] | [next] | [standalone]


#15626

FromJulian Gilbey <julian@d-and-j.net>
Date2024-03-19 14:30 +0100
Message-ID<IjHHs-ahd-3@gated-at.bofh.it>
In reply to#15624
Hi Christian,

On Tue, Mar 19, 2024 at 01:29:55PM +0100, Joost van Baal-Ilić wrote:
> Hi Christian,
> 
> Thanks for working on the documentation!
> 
> Op Tue, Mar 19, 2024 at 10:54:43AM +0000 schreef c.buhtz@posteo.jp:
> > Hello,
> > [...]
> 
> I can answer some of your questions, but not all of them.  What I usually do:
> 
> Get a personal access token "somesecret" from the salsa web interface.  Then:
> 
>  $ touch ~/.salsa-token
>  $ chmod og-r ~/.salsa-token
>  $ echo somesecret > ~/.salsa-token
>  $ SALSA_TOKEN=`cat ~/.salsa-token`
> 
> For some actions, the salsa(1) tool (and/or gitlab on salsa.d.o) seems to need
> such a token.  An SSH key is not always enough.
> 
> HTH, Bye,
> 
> Joost

Might also be worth taking a look at
https://wiki.debian.org/Javascript/Tutorial
which has a whole discussion about using salsa and tokens.

Best wishes,

   Julian

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web