git-resource: HTTPS auth doesn't work

Git resources using https auth don’t seem to function at all.

Using this setup:

resources:
- name: reponame
  type: git
  source:
    uri: https://github.com/companyname/reponame.git
    branch: master
    username: githubusername
    password: githubpassword

The check script fails with the following error message:

resource script '/opt/resource/check []' failed: exit status 128

stderr:
Cloning into '/tmp/git-resource-repo-cache'...
fatal: could not read Username for 'https://github.com': No such device or address

HTTPS auth is important because you can’t authenticate submodules using private keys. Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (3 by maintainers)

Most upvoted comments

That makes sense then. There’s no way to automate 2FA (kinda the whole point), so you should probably be using private keys instead.

@chrisburrus : When using 2FA, you can use Github’s personal access tokens instead of the password. Just tested it and it works fine.