Unable to clone, issue similar to others, but running 1.0.0-RC5

Hello, I’m running the latest tag (1.0.0-rc5) and I’ve setup to connect with my company’s Github Enterprise on-prem server. Here are things that work:

  1. I can login as my github enterprise user
  2. I can sync my repositories
  3. I receive webhooks from github enterprise

However, when it attempts to build I get this log message:

|1|Initialized empty Git repository in /drone/src/.git/|
|---|---|
|2|+ git fetch origin +refs/heads/develop:|
|3|fatal: could not read Username for 'https://github.website.com': No such device or address|

(I’ve replaced my company’s domain with website.com, obviously)

Now I’ve seen numerous related issues, most of them having to deal with v0.8 and GOGs, but I’m not running that version and I’m not using GOGs.

I’ve tried:

  1. Setting DRONE_GITHUB_PRIVATE_MODE to “true”
  2. Setting DRONE_GIT_ALWAYS_AUTH to “false”
  3. Setting DRONE_GIT_PASSWORD to my password and DRONE_GIT_USERNAME to my username username (plaintext)
  4. Setting DRONE_GIT_PASSWORD to a password token and DRONE_GIT_USERNAME to x-oauth-token (plaintext)

Each time I rebuild my container, relogin to the website, and click the Restart button, with the same results each time.

I truly love drone, it’s fantastic, I would love to get past this and I can give whatever information needed.

It sounds like your GitHub Enterprise instance has private mode enabled.

  1. Setting DRONE_GITHUB_PRIVATE_MODE to true

this was the correct field in 0.8 but was renamed in 1.0

  1. Setting DRONE_GIT_ALWAYS_AUTH to “false”

This is the correct field in 1.0, but you want to set this to true. This instructs Drone to always authenticate when cloning a repository, even public repositories, which is required when running GitHub Enterprise in private mode.

  1. Setting DRONE_GIT_PASSWORD
  2. Setting DRONE_GIT_PASSWORD

Neither of these should be required.

1 Like

I could have sworn I tried DRONE_GIT_ALWAYS_AUTH set to true, but I guess not. It now works.

To be clear to others, I have these set: DRONE_GITHUB_SERVER, DRONE_GITHUB_CLIENT_ID, DRONE_GITHUB_CLIENT_SECRET, and DRONE_GIT_ALWAYS_AUTH.

(Also, I’m calling it githut now)