Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Github Enterprise URL and Username error #209

Open
NickLarsenNZ opened this issue Oct 4, 2018 · 0 comments
Open

Github Enterprise URL and Username error #209

NickLarsenNZ opened this issue Oct 4, 2018 · 0 comments

Comments

@NickLarsenNZ
Copy link

NickLarsenNZ commented Oct 4, 2018

Describe the bug
If I set the api_endpoint to https://github.internal/api/v3/, I can detect PRs, however when I try to set the status in a job, I get the following error in the get:

Cloning into '/tmp/build/get'...
fatal: could not read Username for 'https://github.com': No such device or address
/opt/resource/lib/commands/in.rb:27:in `output': git clone failed (RuntimeError)
	from /opt/resource/lib/commands/in.rb:110:in `<main>'

So then I also set the uri to https://github.internal/MYORG/my-repo, and receive the following error in the put:

/opt/resource/lib/commands/out.rb:97:in `block in whitelist': undefined method `gsub!' for nil:NilClass (NoMethodError)
	from /opt/resource/lib/commands/out.rb:96:in `each'
	from /opt/resource/lib/commands/out.rb:96:in `whitelist'
	from /opt/resource/lib/commands/out.rb:55:in `block in output'
	from /opt/resource/lib/commands/out.rb:52:in `each'
	from /opt/resource/lib/commands/out.rb:52:in `output'
	from /opt/resource/lib/commands/out.rb:117:in `<main>'

To Reproduce
My type and resource configuration:

- name: pull-request
  type: docker-image
  source:
    repository: jtarchie/pr

resources:
- name: pull-request-source
  type: pull-request
  source:
    access_token: ((github-token))
    username: git
    password: ((github-token))
    uri: https://((github-host))/((github-org))/((github-repo))
    api_endpoint: https://((github-host))/api/v3/
    repo: ((github-org))/((github-repo))
    base: ((branch))
    only_mergeable: true

Expected behavior
I expect to be able to use either Github.com or Github Enterprise for the same configuration if possible, otherwise perhaps clear documentation on what exactly to set when using GitHub Enterprise. (I'm happy to submit a documentation PR)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant