fleet: exit status 128, detail: fatal: could not read Username

Ref: Issue # 134 I created the ssh key exactly as stated below, added the public key to our enterprise github. Rancher v2.5.5, fleet:0.3.300 Still getting ‘git ls-remote https://github.umn.edu/oit-hosting/K8S-Clusters.git refs/heads/master error: exit status 128, detail: fatal: could not read Username for ‘https://github.umn.edu’: terminal prompts disabled’

fleet:v0.3.1-rc2 Rancher v2.5-head (10/30/2020) cc777eb

I duplicated the fleet-examples git repository and created a new private repository for testing https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/duplicating-a-repository

Then I created a GitRepo configuration in Continuous Delivery in the Dashboard using http auth. I generated a developer key to use as a password as I have 2FA enabled. https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token

This worked and I saw the simple bundle deployed to the downstream clusters.

Then I deleted this GitRepo and configured the repository to use SSH auth. I generated a new SSH key pair this way as it seems not all ssh formats are supported:

ssh-keygen -t rsa -b 4096 -m pem -C "izaac@email.com" (No passphrase)

This SSH auth setup also worked and I saw a bundle deployed to downstream clusters.

_Originally posted by @izaac in https://github.com/rancher/fleet/issues/134#issuecomment-719748586_

gz#15882

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Any news about this?

In my case, I changed the repo URL from this: https://gitlab.example.com/path/to/repo.git to this https://gitlab-ci@gitlab.example.com/path/to/repo.git

Maybe try to add your user to the GitHub URL.

Pretty straight forward: kubectl create secret generic <name> --type="kubernetes.io/basic-auth" -n fleet-default --from-literal=username='<user>' --from-literal=password='<pat>'

Any news about this?

seeing a similar issue:

git ls-remote ssh://git@git.FQDN:gitpath refs/heads/test error: exit status 128, detail: No user exists for uid 1000 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Any news about this?

@nayrnet for now I am using the Personal Access Token like travis-sobeck sugested. It works like a charm, you might try that as a workaround for now until this gets fixed 🤐

https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token

And then:

kubectl create secret generic <name> --type="kubernetes.io/basic-auth" -n fleet-default --from-literal=username='<user>' --from-literal=password='<pat>'