jfrog / jfrog/jfrog-cli

Pass server to interactive login for CLI

Open
#3,323 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
595
Forks
307
Avg merge
4d 17h
Merged PRs (30d)
17

Description

Based on https://github.com/jfrog/jfrog-cli/issues/2948

Current state:

jf config add artifactory-live --user=${USERNAME} --url=https://<REDACTED> --interactive=false
jf config use artifactory-live
jf login

the jf login command prompts me to select a server for web login:

Use the arrow keys to navigate: ↓ ↑ → ←
Select whether to create a new server configuration or to web login to an existing one:
  🐸 [New Server]
     artifactory-live

I want to avoid the prompt and directly open the browser web-login.

What i would like to have

Something like jf login --server-id <server> would be handy to mitigate user errors

I guess it would be possible to just directly call existingServerLogin(serverId string) if a --server-id is passed to the command or so

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the jf login command and the mentioned existingServerLogin(serverId string) path. Add support for a --server-id value so login opens the browser flow for that server without showing the server-selection prompt; verify the selected server is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.