Skip to content

credential fill subcommand incorrectly assumes required field(s) #2190

@Adolar0042

Description

@Adolar0042

Current behavior 😯

gix credential fill fails if url field is not provided, even if protocol and host are set

url

When this special attribute is read by git credential, the value is parsed as a URL and treated as if its constituent parts were read (e.g., url=https://example.com would behave as if protocol=https and host=example.com had been provided).

from the git-credential documentation

Expected behavior 🤔

gix credential fill should only fail if both url aswell as protocol and host are not set

Git behavior

git credential fill only fails if both url aswell as protocol and host are not set

Steps to reproduce 🕹

  1. Run
$ gix credential fill << EOF
protocol=https
host=github.com
EOF
  1. Run
$ git credential fill << EOF
protocol=https
host=github.com
EOF
  1. Compare output (git works, gix fails due to missing url field)

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedan issue is accepted as shortcoming to be fixedhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions