Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHE Support #46

Closed
cb80 opened this issue May 5, 2021 · 23 comments · Fixed by #49
Closed

GHE Support #46

cb80 opened this issue May 5, 2021 · 23 comments · Fixed by #49
Assignees
Labels
enhancement New feature or request v4 Release v4.x.x

Comments

@cb80
Copy link

cb80 commented May 5, 2021

Hello Anton Yurchenko

Description

We'd like to use git-release in a GitHub enterprise setup where we run our own github instance. We get the following output:

Run docker://antonyurchenko/git-release:latest
/usr/local/bin/docker run --name antonyurchenkogitreleaselatest_a422c4 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:latest cmd/lbswtchd/lbswtchd
cmd/lbswtchctl/lbswtchctl
INFO 'git-release' version: 3.5.0                 
WARNING 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'ALLOW_EMPTY_CHANGELOG' enabled              
WARNING 'ALLOW_TAG_PREFIX' enabled                   
WARNING 'CHANGELOG_FILE' is set to 'none'            
INFO creating release: 'v0.0.0'                   
FATAL POST https://api.github.com/repos/db/lbswtch/releases: 401 Bad credentials [] 

In the last line, you see that it tries to connect to github.com and not to the github enterprise instance.

The above is based on the following yaml:

    - name: release
      uses: docker://antonyurchenko/git-release:latest
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        CHANGELOG_FILE: "none"
        ALLOW_EMPTY_CHANGELOG: "true"
        ALLOW_TAG_PREFIX: "true"
      with:
        args: |
            cmd/lbswtchd/lbswtchd
            cmd/lbswtchctl/lbswtchctl

If it is ok for you we are willing to invest into this with a little bit of guidance.

@anton-yurchenko anton-yurchenko added the enhancement New feature or request label May 5, 2021
@anton-yurchenko
Copy link
Owner

Hello @cb80,
Sounds like a great enhancement indeed!

Please try out a development version docker://antonyurchenko/git-release:ghe-dev (it will be deleted after a test)

@anton-yurchenko anton-yurchenko added the v3 Release v3.x.x label May 5, 2021
@cb80
Copy link
Author

cb80 commented May 5, 2021

@anton-yurchenko Amazing! The release is created. Only the asset upload fails:

Run docker://antonyurchenko/git-release:ghe-dev
/usr/local/bin/docker run --name antonyurchenkogitreleaseghedev_7dcf54 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:ghe-dev cmd/lbswtchd/lbswtchd
cmd/lbswtchctl/lbswtchctl
INFO 'git-release' version: 3.5.0                 
WARNING 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'ALLOW_EMPTY_CHANGELOG' enabled              
WARNING 'ALLOW_TAG_PREFIX' enabled                   
WARNING 'CHANGELOG_FILE' is set to 'none'            
INFO creating release: 'v0.0.0'                   
INFO uploading asset: 'lbswtchctl'                
INFO uploading asset: 'lbswtchd'                  
ERROR POST https://<ghe>/api/v3/api/uploads/repos/db/lbswtch/releases/17662/assets?name=lbswtchctl: 404 Not Found [] 
ERROR POST https://<ghe>/api/v3/api/uploads/repos/db/lbswtch/releases/17662/assets?name=lbswtchd: 404 Not Found [] 
FATAL error uploading assets (release partially published) 

I repeated the action to check if this is some kind of race and got this:

Run docker://antonyurchenko/git-release:ghe-dev
/usr/local/bin/docker run --name antonyurchenkogitreleaseghedev_c83260 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:ghe-dev cmd/lbswtchd/lbswtchd
cmd/lbswtchctl/lbswtchctl
INFO 'git-release' version: 3.5.0                 
WARNING 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'ALLOW_EMPTY_CHANGELOG' enabled              
WARNING 'ALLOW_TAG_PREFIX' enabled                   
WARNING 'CHANGELOG_FILE' is set to 'none'            
INFO creating release: 'v0.0.0'                   
FATAL POST https://<ghe>/api/v3/repos/db/lbswtch/releases: 422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}] 

@anton-yurchenko
Copy link
Owner

anton-yurchenko commented May 5, 2021

@cb80, I have updated the dev version to use a server URL for uploads instead of an API URL. Please re-run.

Provide an output, as before, with an addition of an output of printenv command (mask sensitive information)
Replace your <ghe> domain with domain.com but leave the host, for example, api.myprivatedomain.io -> api.domain.com (we might need that piece of information as well). You can do this by adding an additional step, like:

      - name: Print EnvVars
        run: printenv

Have you customized instance endpoints, like Base URL / API URL* / Uploads URL, or are those default? Are you able to retrieve those through a server configuration? (we hope to be able to catch those from build env.vars)

Regarding the second failure, this is because a release already exists: Field:tag_name Code:already_exists. Try different tag/release or cleanup this release by deleting and the triggering tag.

@cb80
Copy link
Author

cb80 commented May 5, 2021

@anton-yurchenko I am not sure if the endpoints are customized. I am consuming the GHE instance in my company. But I can for sure ask for such details, if the env vars don't give us a clue.

I am not sure if we have this media.domain.com. Where does this come from?

These are the raw logs:

2021-05-05T11:31:31.1370689Z ##[section]Starting: Request a runner to run this job
2021-05-05T11:31:31.2774684Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'self-hosted'
2021-05-05T11:31:31.3094588Z Found online and idle self-hosted runner in current repository's organization/enterprise account that matches the required labels: 'self-hosted'
2021-05-05T11:31:31.6052385Z ##[section]Finishing: Request a runner to run this job
2021-05-05T11:31:37.0600623Z Current runner version: '2.277.1'
2021-05-05T11:31:37.0604421Z Runner name: 'actions-runner-controller-runnerdeployment-ssk45-rzzk6'
2021-05-05T11:31:37.0605650Z Machine name: 'actions-runner-controller-runnerdeployment-ssk45-rzzk6'
2021-05-05T11:31:37.0610575Z Prepare workflow directory
2021-05-05T11:31:37.1528329Z Prepare all required actions
2021-05-05T11:31:37.1542745Z Getting action download info
2021-05-05T11:31:37.6362914Z Download action repository 'ghcom-actions/actions-setup-go@v2.1.3'
2021-05-05T11:31:38.6186671Z Download action repository 'actions/checkout@v2'
2021-05-05T11:31:39.8297108Z ##[group]Pull down action image 'antonyurchenko/git-release:ghe-dev'
2021-05-05T11:31:39.8348069Z ##[command]/usr/local/bin/docker pull antonyurchenko/git-release:ghe-dev
2021-05-05T11:31:41.6076327Z ghe-dev: Pulling from antonyurchenko/git-release
2021-05-05T11:31:41.6081080Z 388acac169a9: Pulling fs layer
2021-05-05T11:31:41.6084217Z a131cb43eecc: Pulling fs layer
2021-05-05T11:31:41.6084486Z 34fe985c1816: Pulling fs layer
2021-05-05T11:31:41.6085709Z 95f882a032f9: Pulling fs layer
2021-05-05T11:31:41.6085898Z 95f882a032f9: Waiting
2021-05-05T11:31:42.2532022Z 388acac169a9: Verifying Checksum
2021-05-05T11:31:42.2533848Z 388acac169a9: Download complete
2021-05-05T11:31:42.3192981Z 388acac169a9: Pull complete
2021-05-05T11:31:42.4610448Z a131cb43eecc: Verifying Checksum
2021-05-05T11:31:42.4613047Z a131cb43eecc: Download complete
2021-05-05T11:31:42.4622844Z 34fe985c1816: Download complete
2021-05-05T11:31:42.5131629Z a131cb43eecc: Pull complete
2021-05-05T11:31:42.5561608Z 34fe985c1816: Pull complete
2021-05-05T11:31:44.3350614Z 95f882a032f9: Download complete
2021-05-05T11:31:44.4231427Z 95f882a032f9: Pull complete
2021-05-05T11:31:44.4293705Z Digest: sha256:a4db1768ea553e1e3457793aef2c9499340c489c72ad3163b25169103d69ad10
2021-05-05T11:31:44.4313594Z Status: Downloaded newer image for antonyurchenko/git-release:ghe-dev
2021-05-05T11:31:44.4327418Z docker.io/antonyurchenko/git-release:ghe-dev
2021-05-05T11:31:44.4359350Z ##[endgroup]
2021-05-05T11:31:44.4616649Z ##[group]Run ghcom-actions/actions-setup-go@v2.1.3
2021-05-05T11:31:44.4617102Z with:
2021-05-05T11:31:44.4617277Z   go-version: ^1.16
2021-05-05T11:31:44.4617439Z   stable: true
2021-05-05T11:31:44.4617923Z   token: ***
2021-05-05T11:31:44.4618102Z env:
2021-05-05T11:31:44.4618263Z   CGO_ENABLED: 0
2021-05-05T11:31:44.4618562Z ##[endgroup]
2021-05-05T11:31:44.5214013Z Setup go stable version spec ^1.16
2021-05-05T11:31:44.5304108Z Attempting to download ^1.16...
2021-05-05T11:31:45.3805124Z matching ^1.16...
2021-05-05T11:31:45.3846059Z Acquiring 1.16.3 from https://github.com/actions/go-versions/releases/download/1.16.3-710801405/go-1.16.3-linux-x64.tar.gz
2021-05-05T11:31:48.7083515Z Extracting Go...
2021-05-05T11:31:48.7198540Z [command]/usr/bin/tar xz --warning=no-unknown-keyword -C /runner/_work/_temp/4a1040ff-629e-44e7-8b87-1963411793e1 -f /runner/_work/_temp/c89e3a83-1899-4d4f-b2b6-76077509868b
2021-05-05T11:31:51.8918006Z Successfully extracted go to /runner/_work/_temp/4a1040ff-629e-44e7-8b87-1963411793e1
2021-05-05T11:31:51.8919046Z Adding to the cache ...
2021-05-05T11:31:55.1378977Z Successfully cached go to /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:31:55.1382399Z Added go to the path
2021-05-05T11:31:55.1499975Z Successfully setup go version ^1.16
2021-05-05T11:31:55.1624224Z go version go1.16.3 linux/amd64
2021-05-05T11:31:55.1624419Z 
2021-05-05T11:31:55.1624917Z ##[group]go env
2021-05-05T11:31:55.2184084Z GO111MODULE=""
2021-05-05T11:31:55.2184564Z GOARCH="amd64"
2021-05-05T11:31:55.2184750Z GOBIN=""
2021-05-05T11:31:55.2185577Z GOCACHE="/home/runner/.cache/go-build"
2021-05-05T11:31:55.2185790Z GOENV="/home/runner/.config/go/env"
2021-05-05T11:31:55.2186002Z GOEXE=""
2021-05-05T11:31:55.2186175Z GOFLAGS=""
2021-05-05T11:31:55.2186359Z GOHOSTARCH="amd64"
2021-05-05T11:31:55.2186536Z GOHOSTOS="linux"
2021-05-05T11:31:55.2186753Z GOINSECURE=""
2021-05-05T11:31:55.2186925Z GOMODCACHE="/home/runner/go/pkg/mod"
2021-05-05T11:31:55.2187106Z GONOPROXY=""
2021-05-05T11:31:55.2187648Z GONOSUMDB=""
2021-05-05T11:31:55.2187805Z GOOS="linux"
2021-05-05T11:31:55.2187967Z GOPATH="/home/runner/go"
2021-05-05T11:31:55.2188126Z GOPRIVATE=""
2021-05-05T11:31:55.2188336Z GOPROXY="https://proxy.golang.org,direct"
2021-05-05T11:31:55.2188569Z GOROOT="/runner/_work/_tool/go/1.16.3/x64"
2021-05-05T11:31:55.2188734Z GOSUMDB="sum.golang.org"
2021-05-05T11:31:55.2188913Z GOTMPDIR=""
2021-05-05T11:31:55.2189086Z GOTOOLDIR="/runner/_work/_tool/go/1.16.3/x64/pkg/tool/linux_amd64"
2021-05-05T11:31:55.2189262Z GOVCS=""
2021-05-05T11:31:55.2189420Z GOVERSION="go1.16.3"
2021-05-05T11:31:55.2189586Z GCCGO="gccgo"
2021-05-05T11:31:55.2189749Z AR="ar"
2021-05-05T11:31:55.2189929Z CC="gcc"
2021-05-05T11:31:55.2190082Z CXX="g++"
2021-05-05T11:31:55.2190252Z CGO_ENABLED="0"
2021-05-05T11:31:55.2190408Z GOMOD="/dev/null"
2021-05-05T11:31:55.2190784Z CGO_CFLAGS="-g -O2"
2021-05-05T11:31:55.2190958Z CGO_CPPFLAGS=""
2021-05-05T11:31:55.2191250Z CGO_CXXFLAGS="-g -O2"
2021-05-05T11:31:55.2191560Z CGO_FFLAGS="-g -O2"
2021-05-05T11:31:55.2192894Z CGO_LDFLAGS="-g -O2"
2021-05-05T11:31:55.2193260Z PKG_CONFIG="pkg-config"
2021-05-05T11:31:55.2193790Z GOGCCFLAGS="-fPIC -m64 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3666647588=/tmp/go-build -gno-record-gcc-switches"
2021-05-05T11:31:55.2193912Z 
2021-05-05T11:31:55.2194509Z ##[endgroup]
2021-05-05T11:31:55.2385788Z ##[group]Run actions/checkout@v2
2021-05-05T11:31:55.2386010Z with:
2021-05-05T11:31:55.2386175Z   repository: db/lbswtch
2021-05-05T11:31:55.2386518Z   token: ***
2021-05-05T11:31:55.2386736Z   ssh-strict: true
2021-05-05T11:31:55.2386894Z   persist-credentials: true
2021-05-05T11:31:55.2387072Z   clean: true
2021-05-05T11:31:55.2387230Z   fetch-depth: 1
2021-05-05T11:31:55.2387388Z   lfs: false
2021-05-05T11:31:55.2387544Z   submodules: false
2021-05-05T11:31:55.2387704Z env:
2021-05-05T11:31:55.2387860Z   CGO_ENABLED: 0
2021-05-05T11:31:55.2388047Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:31:55.2388214Z ##[endgroup]
2021-05-05T11:31:55.3528827Z Syncing repository: db/lbswtch
2021-05-05T11:31:55.3536291Z ##[group]Getting Git version info
2021-05-05T11:31:55.3537969Z Working directory is '/runner/_work/lbswtch/lbswtch'
2021-05-05T11:31:55.3595226Z [command]/usr/bin/git version
2021-05-05T11:31:55.3647757Z git version 2.31.1
2021-05-05T11:31:55.3673807Z ##[endgroup]
2021-05-05T11:31:55.3682205Z Deleting the contents of '/runner/_work/lbswtch/lbswtch'
2021-05-05T11:31:55.3687243Z ##[group]Initializing the repository
2021-05-05T11:31:55.3695718Z [command]/usr/bin/git init /runner/_work/lbswtch/lbswtch
2021-05-05T11:31:55.3735070Z hint: Using 'master' as the name for the initial branch. This default branch name
2021-05-05T11:31:55.3735341Z hint: is subject to change. To configure the initial branch name to use in all
2021-05-05T11:31:55.3735561Z hint: of your new repositories, which will suppress this warning, call:
2021-05-05T11:31:55.3735750Z hint: 
2021-05-05T11:31:55.3736157Z hint: 	git config --global init.defaultBranch <name>
2021-05-05T11:31:55.3736399Z hint: 
2021-05-05T11:31:55.3736765Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2021-05-05T11:31:55.3737151Z hint: 'development'. The just-created branch can be renamed via this command:
2021-05-05T11:31:55.3737362Z hint: 
2021-05-05T11:31:55.3737661Z hint: 	git branch -m <name>
2021-05-05T11:31:55.3744952Z Initialized empty Git repository in /runner/_work/lbswtch/lbswtch/.git/
2021-05-05T11:31:55.3759262Z [command]/usr/bin/git remote add origin https://github.domain.com/db/lbswtch
2021-05-05T11:31:55.3795470Z ##[endgroup]
2021-05-05T11:31:55.3795695Z ##[group]Disabling automatic garbage collection
2021-05-05T11:31:55.3804225Z [command]/usr/bin/git config --local gc.auto 0
2021-05-05T11:31:55.3834363Z ##[endgroup]
2021-05-05T11:31:55.3839318Z ##[group]Setting up auth
2021-05-05T11:31:55.3873701Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-05-05T11:31:55.3910935Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-05-05T11:31:55.4197457Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.domain\.com\/\.extraheader
2021-05-05T11:31:55.4236029Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.domain\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.domain.com/.extraheader' || :
2021-05-05T11:31:55.4513479Z [command]/usr/bin/git config --local http.https://github.domain.com/.extraheader AUTHORIZATION: basic ***
2021-05-05T11:31:55.4568298Z ##[endgroup]
2021-05-05T11:31:55.4568612Z ##[group]Fetching the repository
2021-05-05T11:31:55.4581920Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +89d675dcd8a15d1f6d5243f99097896bae4812fd:refs/tags/v0.0.0
2021-05-05T11:31:55.6524299Z remote: Enumerating objects: 30, done.        
2021-05-05T11:31:55.6525236Z remote: Counting objects:   3% (1/30)        
2021-05-05T11:31:55.6525766Z remote: Counting objects:   6% (2/30)        
2021-05-05T11:31:55.6526207Z remote: Counting objects:  10% (3/30)        
2021-05-05T11:31:55.6526577Z remote: Counting objects:  13% (4/30)        
2021-05-05T11:31:55.6527325Z remote: Counting objects:  16% (5/30)        
2021-05-05T11:31:55.6527965Z remote: Counting objects:  20% (6/30)        
2021-05-05T11:31:55.6528393Z remote: Counting objects:  23% (7/30)        
2021-05-05T11:31:55.6528777Z remote: Counting objects:  26% (8/30)        
2021-05-05T11:31:55.6529156Z remote: Counting objects:  30% (9/30)        
2021-05-05T11:31:55.6529508Z remote: Counting objects:  33% (10/30)        
2021-05-05T11:31:55.6529863Z remote: Counting objects:  36% (11/30)        
2021-05-05T11:31:55.6530262Z remote: Counting objects:  40% (12/30)        
2021-05-05T11:31:55.6530656Z remote: Counting objects:  43% (13/30)        
2021-05-05T11:31:55.6531159Z remote: Counting objects:  46% (14/30)        
2021-05-05T11:31:55.6531555Z remote: Counting objects:  50% (15/30)        
2021-05-05T11:31:55.6531871Z remote: Counting objects:  53% (16/30)        
2021-05-05T11:31:55.6532183Z remote: Counting objects:  56% (17/30)        
2021-05-05T11:31:55.6532692Z remote: Counting objects:  60% (18/30)        
2021-05-05T11:31:55.6533056Z remote: Counting objects:  63% (19/30)        
2021-05-05T11:31:55.6600109Z remote: Counting objects:  66% (20/30)        
2021-05-05T11:31:55.6600325Z remote: Counting objects:  70% (21/30)        
2021-05-05T11:31:55.6600525Z remote: Counting objects:  73% (22/30)        
2021-05-05T11:31:55.6600710Z remote: Counting objects:  76% (23/30)        
2021-05-05T11:31:55.6600891Z remote: Counting objects:  80% (24/30)        
2021-05-05T11:31:55.6601072Z remote: Counting objects:  83% (25/30)        
2021-05-05T11:31:55.6601255Z remote: Counting objects:  86% (26/30)        
2021-05-05T11:31:55.6601770Z remote: Counting objects:  90% (27/30)        
2021-05-05T11:31:55.6602045Z remote: Counting objects:  93% (28/30)        
2021-05-05T11:31:55.6602230Z remote: Counting objects:  96% (29/30)        
2021-05-05T11:31:55.6602430Z remote: Counting objects: 100% (30/30)        
2021-05-05T11:31:55.6602742Z remote: Counting objects: 100% (30/30), done.        
2021-05-05T11:31:55.6602949Z remote: Compressing objects:   4% (1/23)        
2021-05-05T11:31:55.6603136Z remote: Compressing objects:   8% (2/23)        
2021-05-05T11:31:55.6603357Z remote: Compressing objects:  13% (3/23)        
2021-05-05T11:31:55.6603545Z remote: Compressing objects:  17% (4/23)        
2021-05-05T11:31:55.6603823Z remote: Compressing objects:  21% (5/23)        
2021-05-05T11:31:55.6604010Z remote: Compressing objects:  26% (6/23)        
2021-05-05T11:31:55.6604189Z remote: Compressing objects:  30% (7/23)        
2021-05-05T11:31:55.6604398Z remote: Compressing objects:  34% (8/23)        
2021-05-05T11:31:55.6604577Z remote: Compressing objects:  39% (9/23)        
2021-05-05T11:31:55.6604968Z remote: Compressing objects:  43% (10/23)        
2021-05-05T11:31:55.6605155Z remote: Compressing objects:  47% (11/23)        
2021-05-05T11:31:55.6605386Z remote: Compressing objects:  52% (12/23)        
2021-05-05T11:31:55.6605766Z remote: Compressing objects:  56% (13/23)        
2021-05-05T11:31:55.6606001Z remote: Compressing objects:  60% (14/23)        
2021-05-05T11:31:55.6606314Z remote: Compressing objects:  65% (15/23)        
2021-05-05T11:31:55.6606586Z remote: Compressing objects:  69% (16/23)        
2021-05-05T11:31:55.6606850Z remote: Compressing objects:  73% (17/23)        
2021-05-05T11:31:55.6607186Z remote: Compressing objects:  78% (18/23)        
2021-05-05T11:31:55.6607689Z remote: Compressing objects:  82% (19/23)        
2021-05-05T11:31:55.6607921Z remote: Compressing objects:  86% (20/23)        
2021-05-05T11:31:55.6608100Z remote: Compressing objects:  91% (21/23)        
2021-05-05T11:31:55.6608276Z remote: Compressing objects:  95% (22/23)        
2021-05-05T11:31:55.6608565Z remote: Compressing objects: 100% (23/23)        
2021-05-05T11:31:55.6608808Z remote: Compressing objects: 100% (23/23), done.        
2021-05-05T11:31:55.6612479Z remote: Total 30 (delta 2), reused 19 (delta 0), pack-reused 0        
2021-05-05T11:31:55.6747547Z From https://github.domain.com/db/lbswtch
2021-05-05T11:31:55.6748680Z  * [new ref]         89d675dcd8a15d1f6d5243f99097896bae4812fd -> v0.0.0
2021-05-05T11:31:55.6772280Z ##[endgroup]
2021-05-05T11:31:55.6772810Z ##[group]Determining the checkout info
2021-05-05T11:31:55.6777648Z ##[endgroup]
2021-05-05T11:31:55.6777982Z ##[group]Checking out the ref
2021-05-05T11:31:55.6791916Z [command]/usr/bin/git checkout --progress --force refs/tags/v0.0.0
2021-05-05T11:31:55.6867587Z Note: switching to 'refs/tags/v0.0.0'.
2021-05-05T11:31:55.6867908Z 
2021-05-05T11:31:55.6868330Z You are in 'detached HEAD' state. You can look around, make experimental
2021-05-05T11:31:55.6868557Z changes and commit them, and you can discard any commits you make in this
2021-05-05T11:31:55.6868810Z state without impacting any branches by switching back to a branch.
2021-05-05T11:31:55.6868948Z 
2021-05-05T11:31:55.6869137Z If you want to create a new branch to retain commits you create, you may
2021-05-05T11:31:55.6869552Z do so (now or later) by using -c with the switch command. Example:
2021-05-05T11:31:55.6869652Z 
2021-05-05T11:31:55.6869980Z   git switch -c <new-branch-name>
2021-05-05T11:31:55.6870147Z 
2021-05-05T11:31:55.6870323Z Or undo this operation with:
2021-05-05T11:31:55.6870404Z 
2021-05-05T11:31:55.6870706Z   git switch -
2021-05-05T11:31:55.6870839Z 
2021-05-05T11:31:55.6871021Z Turn off this advice by setting config variable advice.detachedHead to false
2021-05-05T11:31:55.6871122Z 
2021-05-05T11:31:55.6871307Z HEAD is now at 89d675d update latest tag
2021-05-05T11:31:55.6872120Z ##[endgroup]
2021-05-05T11:31:55.6884939Z [command]/usr/bin/git log -1
2021-05-05T11:31:55.6917998Z commit 89d675dcd8a15d1f6d5243f99097896bae4812fd
2021-05-05T11:31:55.6918296Z Author: cb80 <cb80@domain.com>
2021-05-05T11:31:55.6918524Z Date:   Tue May 4 17:41:25 2021 +0200
2021-05-05T11:31:55.6918668Z 
2021-05-05T11:31:55.6918866Z     update latest tag
2021-05-05T11:31:55.7046378Z ##[group]Run go vet -all ./...
2021-05-05T11:31:55.7047342Z �[36;1mgo vet -all ./...�[0m
2021-05-05T11:31:55.7072233Z shell: /usr/bin/bash -e {0}
2021-05-05T11:31:55.7072380Z env:
2021-05-05T11:31:55.7072728Z   CGO_ENABLED: 0
2021-05-05T11:31:55.7072909Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:31:55.7073100Z ##[endgroup]
2021-05-05T11:31:59.5515442Z ##[group]Run go test -vet=off ./...
2021-05-05T11:31:59.5515720Z �[36;1mgo test -vet=off ./...�[0m
2021-05-05T11:31:59.5538097Z shell: /usr/bin/bash -e {0}
2021-05-05T11:31:59.5538245Z env:
2021-05-05T11:31:59.5538375Z   CGO_ENABLED: 0
2021-05-05T11:31:59.5538512Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:31:59.5538647Z ##[endgroup]
2021-05-05T11:31:59.7856598Z ?   	github.domain.com/db/lbswtch/cmd/lbswtchctl	[no test files]
2021-05-05T11:31:59.7902281Z ?   	github.domain.com/db/lbswtch/cmd/lbswtchd	[no test files]
2021-05-05T11:31:59.7902634Z ?   	github.domain.com/db/lbswtch/lib/cryptohandler	[no test files]
2021-05-05T11:31:59.7902830Z ?   	github.domain.com/db/lbswtch/lib/types	[no test files]
2021-05-05T11:31:59.7949829Z ##[group]Run go mod tidy
2021-05-05T11:31:59.7950146Z �[36;1mgo mod tidy�[0m
2021-05-05T11:31:59.7950283Z �[36;1mpushd cmd/lbswtchd�[0m
2021-05-05T11:31:59.7950419Z �[36;1mgo build�[0m
2021-05-05T11:31:59.7950549Z �[36;1mpopd�[0m
2021-05-05T11:31:59.7950683Z �[36;1mpushd cmd/lbswtchctl�[0m
2021-05-05T11:31:59.7950818Z �[36;1mgo build�[0m
2021-05-05T11:31:59.7950945Z �[36;1mpopd�[0m
2021-05-05T11:31:59.7971576Z shell: /usr/bin/bash -e {0}
2021-05-05T11:31:59.7971731Z env:
2021-05-05T11:31:59.7971867Z   CGO_ENABLED: 0
2021-05-05T11:31:59.7972007Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:31:59.7972145Z ##[endgroup]
2021-05-05T11:31:59.8349089Z /runner/_work/lbswtch/lbswtch/cmd/lbswtchd /runner/_work/lbswtch/lbswtch
2021-05-05T11:32:00.1796036Z /runner/_work/lbswtch/lbswtch
2021-05-05T11:32:00.1796366Z /runner/_work/lbswtch/lbswtch/cmd/lbswtchctl /runner/_work/lbswtch/lbswtch
2021-05-05T11:32:00.5340729Z /runner/_work/lbswtch/lbswtch
2021-05-05T11:32:00.5392794Z ##[group]Run printenv
2021-05-05T11:32:00.5393048Z �[36;1mprintenv�[0m
2021-05-05T11:32:00.5419280Z shell: /usr/bin/bash -e {0}
2021-05-05T11:32:00.5419519Z env:
2021-05-05T11:32:00.5419706Z   CGO_ENABLED: 0
2021-05-05T11:32:00.5419885Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:32:00.5420056Z ##[endgroup]
2021-05-05T11:32:00.5487185Z KUBERNETES_SERVICE_PORT_HTTPS=443
2021-05-05T11:32:00.5487472Z DOCKER_TLS_VERIFY=1
2021-05-05T11:32:00.5487626Z DOCKER_REGISTRY_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5487787Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5487954Z CERT_MANAGER_WEBHOOK_PORT=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5488127Z GRAFANA_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5488274Z EXTERNAL_DNS_PORT_7979_TCP_PORT=7979
2021-05-05T11:32:00.5488421Z GITHUB_WORKSPACE=/runner/_work/lbswtch/lbswtch
2021-05-05T11:32:00.5488568Z JENKINS_DEV_PORT_8080_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5488774Z JENKINS_DEV_AGENT_PORT_50000_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5488933Z KUBERNETES_SERVICE_PORT=443
2021-05-05T11:32:00.5489076Z PORTUS_DB_PORT_5432_TCP_PORT=5432
2021-05-05T11:32:00.5489225Z EXTERNAL_DNS_PORT_7979_TCP=tcp://<someIPaddress>:7979
2021-05-05T11:32:00.5489376Z GRAFANA_PORT_80_TCP=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5489526Z PORTUS_PORT_3000_TCP=tcp://<someIPaddress>:3000
2021-05-05T11:32:00.5489678Z RUNNER_WORKDIR=/runner/_work
2021-05-05T11:32:00.5490607Z HOSTNAME=actions-runner-controller-runnerdeployment-ssk45-rzzk6
2021-05-05T11:32:00.5490788Z CERT_MANAGER_PORT=tcp://<someIPaddress>:9402
2021-05-05T11:32:00.5491201Z GITHUB_PATH=/runner/_work/_temp/_runner_file_commands/add_path_8dbef9ef-d677-4a37-86e7-3417315f9c09
2021-05-05T11:32:00.5491390Z GITHUB_ACTION=run4
2021-05-05T11:32:00.5491565Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_PORT_80_TCP_PORT=80
2021-05-05T11:32:00.5491717Z DOCKERD_IN_RUNNER=false
2021-05-05T11:32:00.5491858Z TRAEFIK_INGRESS_SERVICE_SERVICE_PORT=80
2021-05-05T11:32:00.5492010Z PORTUS_DB_PORT=tcp://<someIPaddress>:5432
2021-05-05T11:32:00.5492155Z CERT_MANAGER_WEBHOOK_PORT_443_TCP_PROTO=tcp
2021-05-05T11:32:00.5492300Z GRAFANA_PORT=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5492439Z GITHUB_RUN_NUMBER=5
2021-05-05T11:32:00.5492712Z TRAEFIK_INGRESS_SERVICE_PORT_443_TCP_PROTO=tcp
2021-05-05T11:32:00.5492861Z JENKINS_PORT_8080_TCP_PORT=8080
2021-05-05T11:32:00.5493056Z GITHUB_URL=https://github.domain.com/
2021-05-05T11:32:00.5493218Z RUNNER_ORG=db
2021-05-05T11:32:00.5493360Z JENKINS_AGENT_PORT_50000_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5493507Z JENKINS_DEV_PORT_8080_TCP_PORT=8080
2021-05-05T11:32:00.5493653Z DOCKER_REGISTRY_PORT_5000_TCP_PORT=5000
2021-05-05T11:32:00.5494117Z LOKI_PORT_3100_TCP_PROTO=tcp
2021-05-05T11:32:00.5494263Z EXTERNAL_DNS_PORT_7979_TCP_PROTO=tcp
2021-05-05T11:32:00.5494405Z DRONE_RUNNER_KUBE_SERVICE_PORT=3000
2021-05-05T11:32:00.5494578Z EXTERNAL_DNS_SERVICE_PORT=7979
2021-05-05T11:32:00.5494877Z JENKINS_DEV_AGENT_SERVICE_PORT=50000
2021-05-05T11:32:00.5495162Z CERT_MANAGER_WEBHOOK_SERVICE_PORT_HTTPS=443
2021-05-05T11:32:00.5495327Z JENKINS_LOGS_PORT_80_TCP_PROTO=tcp
2021-05-05T11:32:00.5495494Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_PORT_80_TCP=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5495835Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_PORT_8443_TCP_PROTO=tcp
2021-05-05T11:32:00.5496056Z JENKINS_DEV_AGENT_PORT=tcp://<someIPaddress>:50000
2021-05-05T11:32:00.5496205Z PWD=/runner/_work/lbswtch/lbswtch
2021-05-05T11:32:00.5496351Z JENKINS_AGENT_PORT=tcp://<someIPaddress>:50000
2021-05-05T11:32:00.5496499Z LOKI_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5496652Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_PORT_443_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5496812Z CERT_MANAGER_PORT_9402_TCP_PORT=9402
2021-05-05T11:32:00.5496956Z TRAEFIK_INGRESS_SERVICE_SERVICE_PORT_HTTP=80
2021-05-05T11:32:00.5497096Z GITHUB_ACTIONS=true
2021-05-05T11:32:00.5497238Z LOKI_PORT_3100_TCP=tcp://<someIPaddress>:3100
2021-05-05T11:32:00.5497579Z PORTUS_DB_PORT_5432_TCP=tcp://<someIPaddress>:5432
2021-05-05T11:32:00.5497762Z JENKINS_LOGS_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5497911Z DRONE_RUNNER_KUBE_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5498059Z JENKINS_LOGS_PORT=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5498212Z TRAEFIK_INGRESS_SERVICE_PORT_80_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5498368Z GITHUB_SHA=89d675dcd8a15d1f6d5243f99097896bae4812fd
2021-05-05T11:32:00.5498516Z PORTUS_DB_PORT_5432_TCP_PROTO=tcp
2021-05-05T11:32:00.5498658Z LOKI_PORT_3100_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5498806Z JENKINS_PORT_8080_TCP=tcp://<someIPaddress>:8080
2021-05-05T11:32:00.5498964Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_PORT=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5499133Z JENKINS_SERVICE_PORT_HTTP=8080
2021-05-05T11:32:00.5499356Z _=/usr/bin/printenv
2021-05-05T11:32:00.5499496Z GRAFANA_SERVICE_PORT_SERVICE=80
2021-05-05T11:32:00.5499641Z JENKINS_AGENT_PORT_50000_TCP_PROTO=tcp
2021-05-05T11:32:00.5499783Z PORTUS_DB_SERVICE_PORT=5432
2021-05-05T11:32:00.5499934Z JENKINS_PORT_8080_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5500079Z JENKINS_DEV_SERVICE_PORT=8080
2021-05-05T11:32:00.5500224Z TRAEFIK_DASHBOARD_PORT_8080_TCP_PORT=8080
2021-05-05T11:32:00.5500373Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_PORT_443_TCP_PORT=443
2021-05-05T11:32:00.5500540Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_PORT_8443_TCP=tcp://<someIPaddress>:8443
2021-05-05T11:32:00.5500708Z TRAEFIK_INGRESS_SERVICE_PORT_80_TCP_PROTO=tcp
2021-05-05T11:32:00.5500861Z TRAEFIK_DASHBOARD_PORT_8080_TCP=tcp://<someIPaddress>:8080
2021-05-05T11:32:00.5501013Z GITHUB_REF=refs/tags/v0.0.0
2021-05-05T11:32:00.5501154Z DRONE_PORT_80_TCP_PORT=80
2021-05-05T11:32:00.5501294Z RUNNER_OS=Linux
2021-05-05T11:32:00.5501434Z DRONE_PORT_80_TCP_PROTO=tcp
2021-05-05T11:32:00.5501584Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_SERVICE_PORT_HTTPS=8443
2021-05-05T11:32:00.5501734Z HOME=/home/runner
2021-05-05T11:32:00.5501876Z JENKINS_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5502058Z GITHUB_API_URL=https://github.domain.com/api/v3
2021-05-05T11:32:00.5502242Z JENKINS_DEV_AGENT_SERVICE_PORT_AGENT_LISTENER=50000
2021-05-05T11:32:00.5502394Z KUBERNETES_PORT_443_TCP=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5502681Z TRAEFIK_INGRESS_SERVICE_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5503195Z RUNNER_TRACKING_ID=github_db4954b0-baf6-442b-9076-ab9dcd6c996d
2021-05-05T11:32:00.5503370Z DOCKER_REGISTRY_PORT_5000_TCP=tcp://<someIPaddress>:5000
2021-05-05T11:32:00.5503522Z PORTUS_SERVICE_PORT_PORTUS=3000
2021-05-05T11:32:00.5503670Z DRONE_RUNNER_KUBE_PORT_3000_TCP_PORT=3000
2021-05-05T11:32:00.5503818Z CERT_MANAGER_WEBHOOK_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5503962Z RUNNER_TEMP=/runner/_work/_temp
2021-05-05T11:32:00.5504325Z TRAEFIK_INGRESS_SERVICE_SERVICE_PORT_HTTPS=443
2021-05-05T11:32:00.5504619Z CERT_MANAGER_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5504822Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5504995Z JENKINS_DEV_AGENT_PORT_50000_TCP=tcp://<someIPaddress>:50000
2021-05-05T11:32:00.5505484Z GITHUB_ENV=/runner/_work/_temp/_runner_file_commands/set_env_8dbef9ef-d677-4a37-86e7-3417315f9c09
2021-05-05T11:32:00.5505667Z PORTUS_DB_SERVICE_PORT_PORTUS_DB=5432
2021-05-05T11:32:00.5505815Z CERT_MANAGER_PORT_9402_TCP_PROTO=tcp
2021-05-05T11:32:00.5505967Z GITHUB_EVENT_PATH=/runner/_work/_temp/_github_workflow/event.json
2021-05-05T11:32:00.5506123Z CERT_MANAGER_WEBHOOK_PORT_443_TCP_PORT=443
2021-05-05T11:32:00.5506265Z GITHUB_EVENT_NAME=push
2021-05-05T11:32:00.5506406Z CERT_MANAGER_WEBHOOK_SERVICE_PORT=443
2021-05-05T11:32:00.5506556Z CERT_MANAGER_PORT_9402_TCP=tcp://<someIPaddress>:9402
2021-05-05T11:32:00.5506711Z DOCKER_REGISTRY_PORT=tcp://<someIPaddress>:5000
2021-05-05T11:32:00.5506871Z TRAEFIK_DASHBOARD_SERVICE_PORT_DASHBOARD_HTTP=8080
2021-05-05T11:32:00.5507018Z PORTUS_PORT_3000_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5507162Z JENKINS_PORT_8080_TCP_PROTO=tcp
2021-05-05T11:32:00.5507306Z DRONE_RUNNER_KUBE_PORT_3000_TCP_PROTO=tcp
2021-05-05T11:32:00.5507580Z RUNNER_ASSETS_DIR=/runnertmp
2021-05-05T11:32:00.5507752Z GITHUB_RUN_ID=55025
2021-05-05T11:32:00.5507897Z EXTERNAL_DNS_PORT_7979_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5508041Z GOROOT=/runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:32:00.5508187Z JENKINS_AGENT_PORT_50000_TCP_PORT=50000
2021-05-05T11:32:00.5508338Z TRAEFIK_DASHBOARD_PORT=tcp://<someIPaddress>:8080
2021-05-05T11:32:00.5508491Z JENKINS_AGENT_SERVICE_PORT_AGENT_LISTENER=50000
2021-05-05T11:32:00.5508651Z LOKI_PORT_3100_TCP_PORT=3100
2021-05-05T11:32:00.5508796Z JENKINS_DEV_AGENT_PORT_50000_TCP_PROTO=tcp
2021-05-05T11:32:00.5508936Z DRONE_SERVICE_PORT_HTTP=80
2021-05-05T11:32:00.5509091Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5509525Z JENKINS_AGENT_PORT_50000_TCP=tcp://<someIPaddress>:50000
2021-05-05T11:32:00.5509683Z GITHUB_ACTOR=D055539
2021-05-05T11:32:00.5509821Z LOKI_SERVICE_PORT=3100
2021-05-05T11:32:00.5509971Z TRAEFIK_INGRESS_SERVICE_PORT_443_TCP=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5510134Z JENKINS_DEV_PORT=tcp://<someIPaddress>:8080
2021-05-05T11:32:00.5510293Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_PORT_443_TCP=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5510454Z TRAEFIK_DASHBOARD_PORT_8080_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5510600Z GRAFANA_PORT_80_TCP_PROTO=tcp
2021-05-05T11:32:00.5510740Z DRONE_SERVICE_PORT=80
2021-05-05T11:32:00.5510893Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_PORT=tcp://<someIPaddress>:8443
2021-05-05T11:32:00.5511086Z GITHUB_GRAPHQL_URL=https://github.domain.com/api/graphql
2021-05-05T11:32:00.5511259Z EXTERNAL_DNS_SERVICE_PORT_HTTP=7979
2021-05-05T11:32:00.5511414Z DRONE_RUNNER_KUBE_PORT_3000_TCP=tcp://<someIPaddress>:3000
2021-05-05T11:32:00.5511577Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_PORT_8443_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5511742Z LOKI_PORT=tcp://<someIPaddress>:3100
2021-05-05T11:32:00.5511888Z JENKINS_PORT=tcp://<someIPaddress>:8080
2021-05-05T11:32:00.5512046Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_SERVICE_PORT_HTTP=80
2021-05-05T11:32:00.5512200Z RUNNER_GROUP=Default
2021-05-05T11:32:00.5512683Z PORTUS_DB_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5512843Z DOCKER_REGISTRY_PORT_5000_TCP_PROTO=tcp
2021-05-05T11:32:00.5513011Z GITHUB_SERVER_URL=https://github.domain.com
2021-05-05T11:32:00.5513172Z DRONE_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5513318Z JENKINS_DEV_PORT_8080_TCP=tcp://<someIPaddress>:8080
2021-05-05T11:32:00.5513465Z PORTUS_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5513607Z DRONE_PORT=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5513751Z JENKINS_DEV_AGENT_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5513893Z JENKINS_DEV_PORT_8080_TCP_PROTO=tcp
2021-05-05T11:32:00.5514034Z DOCKER_CERT_PATH=/certs/client
2021-05-05T11:32:00.5514336Z TRAEFIK_DASHBOARD_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5514481Z EXTERNAL_DNS_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5514626Z JENKINS_LOGS_SERVICE_PORT=80
2021-05-05T11:32:00.5514766Z PORTUS_PORT_3000_TCP_PORT=3000
2021-05-05T11:32:00.5514910Z SHLVL=1
2021-05-05T11:32:00.5515044Z GRAFANA_PORT_80_TCP_PORT=80
2021-05-05T11:32:00.5515198Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_PORT_80_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5515358Z DOCKER_REGISTRY_SERVICE_PORT=5000
2021-05-05T11:32:00.5515498Z TRAEFIK_DASHBOARD_SERVICE_PORT=8080
2021-05-05T11:32:00.5515640Z DRONE_PORT_80_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5515782Z KUBERNETES_PORT_443_TCP_PROTO=tcp
2021-05-05T11:32:00.5515926Z JENKINS_LOGS_PORT_80_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5516072Z RUNNER_TOOL_CACHE=/runner/_work/_tool
2021-05-05T11:32:00.5516216Z GRAFANA_PORT_80_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5516360Z KUBERNETES_PORT_443_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5516507Z JENKINS_DEV_SERVICE_PORT_HTTP=8080
2021-05-05T11:32:00.5516653Z DOCKER_REGISTRY_SERVICE_PORT_DOCKER_REGISTRY=5000
2021-05-05T11:32:00.5516801Z DRONE_RUNNER_KUBE_SERVICE_PORT_HTTP=3000
2021-05-05T11:32:00.5516947Z CERT_MANAGER_PORT_9402_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5517162Z PORTUS_SERVICE_PORT=3000
2021-05-05T11:32:00.5517324Z GITHUB_JOB=build
2021-05-05T11:32:00.5517459Z GRAFANA_SERVICE_PORT=80
2021-05-05T11:32:00.5517606Z DOCKER_REGISTRY_PORT_5000_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5517751Z LOKI_SERVICE_PORT_HTTP_METRICS=3100
2021-05-05T11:32:00.5517904Z CERT_MANAGER_WEBHOOK_PORT_443_TCP=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5518057Z DOCKER_HOST=tcp://localhost:2376
2021-05-05T11:32:00.5518206Z DRONE_RUNNER_KUBE_PORT_3000_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5518356Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_SERVICE_PORT=443
2021-05-05T11:32:00.5518503Z GITHUB_REPOSITORY=db/lbswtch
2021-05-05T11:32:00.5518650Z TRAEFIK_INGRESS_SERVICE_PORT_443_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5518810Z JENKINS_DEV_AGENT_PORT_50000_TCP_PORT=50000
2021-05-05T11:32:00.5518955Z KUBERNETES_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5519099Z DRONE_PORT_80_TCP=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5519246Z JENKINS_AGENT_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5519396Z KUBERNETES_PORT=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5519539Z KUBERNETES_PORT_443_TCP_PORT=443
2021-05-05T11:32:00.5519681Z RUNNER_WORKSPACE=/runner/_work/lbswtch
2021-05-05T11:32:00.5519831Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_SERVICE_PORT_HTTPS=443
2021-05-05T11:32:00.5519977Z GITHUB_ACTION_REPOSITORY=
2021-05-05T11:32:00.5520155Z PATH=/home/runner/go/bin:/runner/_work/_tool/go/1.16.3/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2021-05-05T11:32:00.5520338Z TRAEFIK_INGRESS_SERVICE_PORT_80_TCP=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5520485Z GITHUB_BASE_REF=
2021-05-05T11:32:00.5520623Z JENKINS_AGENT_SERVICE_PORT=50000
2021-05-05T11:32:00.5520760Z CI=true
2021-05-05T11:32:00.5520902Z PORTUS_DB_PORT_5432_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5521059Z CGO_ENABLED=0
2021-05-05T11:32:00.5521195Z PORTUS_PORT=tcp://<someIPaddress>:3000
2021-05-05T11:32:00.5521345Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_SERVICE_PORT=80
2021-05-05T11:32:00.5521500Z GITHUB_REPOSITORY_OWNER=db
2021-05-05T11:32:00.5521650Z TRAEFIK_INGRESS_SERVICE_PORT=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5521807Z ACTIONS_RUNNER_CONTROLLER_GITHUB_WEBHOOK_SERVER_PORT_80_TCP_PROTO=tcp
2021-05-05T11:32:00.5521959Z GITHUB_HEAD_REF=
2021-05-05T11:32:00.5522097Z TRAEFIK_INGRESS_SERVICE_PORT_443_TCP_PORT=443
2021-05-05T11:32:00.5522237Z GITHUB_ACTION_REF=
2021-05-05T11:32:00.5522376Z JENKINS_LOGS_SERVICE_PORT_JENKINS_LOGS=80
2021-05-05T11:32:00.5522757Z JENKINS_LOGS_PORT_80_TCP_PORT=80
2021-05-05T11:32:00.5523063Z CERT_MANAGER_WEBHOOK_PORT_443_TCP_ADDR=<someIPaddress>
2021-05-05T11:32:00.5523299Z JENKINS_SERVICE_PORT=8080
2021-05-05T11:32:00.5523546Z TRAEFIK_DASHBOARD_PORT_8080_TCP_PROTO=tcp
2021-05-05T11:32:00.5524015Z RUNNER_ENTERPRISE=
2021-05-05T11:32:00.5524285Z RUNNER_LABELS=
2021-05-05T11:32:00.5524570Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_PORT_443_TCP_PROTO=tcp
2021-05-05T11:32:00.5524860Z GITHUB_WORKFLOW=Publish a release on a tag event
2021-05-05T11:32:00.5525159Z DRONE_RUNNER_KUBE_PORT=tcp://<someIPaddress>:3000
2021-05-05T11:32:00.5525441Z DEBIAN_FRONTEND=noninteractive
2021-05-05T11:32:00.5525729Z EXTERNAL_DNS_PORT=tcp://<someIPaddress>:7979
2021-05-05T11:32:00.5526015Z JENKINS_LOGS_PORT_80_TCP=tcp://<someIPaddress>:80
2021-05-05T11:32:00.5526305Z JENKINS_DEV_SERVICE_HOST=<someIPaddress>
2021-05-05T11:32:00.5526594Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_PORT_8443_TCP_PORT=8443
2021-05-05T11:32:00.5526869Z ACTIONS_RUNNER_CONTROLLER_WEBHOOK_PORT=tcp://<someIPaddress>:443
2021-05-05T11:32:00.5527155Z PORTUS_PORT_3000_TCP_PROTO=tcp
2021-05-05T11:32:00.5527372Z OLDPWD=/
2021-05-05T11:32:00.5527624Z ACTIONS_RUNNER_CONTROLLER_METRICS_SERVICE_SERVICE_PORT=8443
2021-05-05T11:32:00.5527783Z TRAEFIK_INGRESS_SERVICE_PORT_80_TCP_PORT=80
2021-05-05T11:32:00.5527933Z CERT_MANAGER_SERVICE_PORT=9402
2021-05-05T11:32:00.5574034Z ##[group]Run docker://antonyurchenko/git-release:ghe-dev
2021-05-05T11:32:00.5574237Z with:
2021-05-05T11:32:00.5574415Z   args: cmd/lbswtchd/lbswtchd
cmd/lbswtchctl/lbswtchctl

2021-05-05T11:32:00.5574558Z env:
2021-05-05T11:32:00.5574685Z   CGO_ENABLED: 0
2021-05-05T11:32:00.5574820Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-05T11:32:00.5575845Z   GITHUB_TOKEN: ***
2021-05-05T11:32:00.5576002Z   CHANGELOG_FILE: none
2021-05-05T11:32:00.5576137Z   ALLOW_EMPTY_CHANGELOG: true
2021-05-05T11:32:00.5576269Z   ALLOW_TAG_PREFIX: true
2021-05-05T11:32:00.5576400Z ##[endgroup]
2021-05-05T11:32:00.5613327Z ##[command]/usr/local/bin/docker run --name antonyurchenkogitreleaseghedev_80a678 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:ghe-dev cmd/lbswtchd/lbswtchd
cmd/lbswtchctl/lbswtchctl
2021-05-05T11:32:01.9290917Z �[36mINFO�[0m 'git-release' version: 3.5.0                 
2021-05-05T11:32:01.9291431Z �[33mWARNING�[0m 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
2021-05-05T11:32:01.9291834Z �[33mWARNING�[0m 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
2021-05-05T11:32:01.9292170Z �[33mWARNING�[0m 'ALLOW_EMPTY_CHANGELOG' enabled              
2021-05-05T11:32:01.9292675Z �[33mWARNING�[0m 'ALLOW_TAG_PREFIX' enabled                   
2021-05-05T11:32:01.9293059Z �[33mWARNING�[0m 'CHANGELOG_FILE' is set to 'none'            
2021-05-05T11:32:01.9293379Z �[36mINFO�[0m creating release: 'v0.0.0'                   
2021-05-05T11:32:02.6527632Z �[36mINFO�[0m uploading asset: 'lbswtchctl'                
2021-05-05T11:32:02.6528080Z �[36mINFO�[0m uploading asset: 'lbswtchd'                  
2021-05-05T11:32:04.2388438Z �[31mERROR�[0m POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17668/assets?name=lbswtchctl: 502 Error uploading to https://media.github.domain.com/releases/17668/files: 404 [] 
2021-05-05T11:32:04.2404040Z �[31mERROR�[0m POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17668/assets?name=lbswtchd: 502 Error uploading to https://media.github.domain.com/releases/17668/files: 404 [] 
2021-05-05T11:32:04.2404916Z �[31mFATAL�[0m error uploading assets (release partially published) 
2021-05-05T11:32:04.3642461Z Post job cleanup.
2021-05-05T11:32:04.4719238Z [command]/usr/bin/git version
2021-05-05T11:32:04.4771283Z git version 2.31.1
2021-05-05T11:32:04.4817335Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-05-05T11:32:04.4855878Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-05-05T11:32:04.5136196Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.domain\.com\/\.extraheader
2021-05-05T11:32:04.5162668Z http.https://github.domain.com/.extraheader
2021-05-05T11:32:04.5175004Z [command]/usr/bin/git config --local --unset-all http.https://github.domain.com/.extraheader
2021-05-05T11:32:04.5235606Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.domain\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.domain.com/.extraheader' || :
2021-05-05T11:32:04.5562666Z Cleaning up orphan processes

@anton-yurchenko
Copy link
Owner

Thanks @cb80

I am not sure where media.domain.com comes from, but we started seeing it when GITHUB_SERVER_URL was provided as an upload URL in the code. Also, it seems that action should rely only on GITHUB_API_URL, so we will not see that media.x.x host anymore.

The issue seems to be the following:
POST https://<ghe>/api/v3/api/uploads/repos/db/lbswtch/releases/17662/assets?name=lbswtchctl: 404 Not Found []
According to the documentation this may be an authentication issue.

I will raise a support ticket, maybe there are some differences between the public/private GitHub.

@cb80
Copy link
Author

cb80 commented May 6, 2021

Hello @anton-yurchenko

I went back to the basics and used curl to successfully do the steps which went fine.

The creation of a release returns the upload_url. Here I see a difference. The first line is what I get when creating a release. The second line is what git-release uses as reported in the error of my initial message:

https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17703/assets{?name,label}
https://github.domain.com/api/v3/api/uploads/repos/db/lbswtch/releases/17704/assets?name=lbswtchctl

There is an additional /v3/api inbetween. I just wonder that I see this difference compared with my initial message, but not when comparing it with the raw log output later. Maybe I made a mistake replacing my domain with domain.com there.

Here are the details of the tests with curl:

# list releases
curl -H "Authorization: token TOKEN" https://github.domain.com/api/v3/repos/db/lbswtch/releases
[

]

# create release
curl -H "Authorization: token TOKEN" -H "Accept: application/vnd.github.v3+json" -X POST https://github.domain.com/api/v3/repos/db/lbswtch/releases -d '{"tag_name":"v0.0.0"}'
{
  "url": "https://github.domain.com/api/v3/repos/db/lbswtch/releases/17703",
  "assets_url": "https://github.domain.com/api/v3/repos/db/lbswtch/releases/17703/assets",
  "upload_url": "https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17703/assets{?name,label}",
  "html_url": "https://github.domain.com/db/lbswtch/releases/tag/v0.0.0",
  "id": 17703,
  "node_id": "MDc6UmVsZWFzZTE3NzAz",
  "tag_name": "v0.0.0",
  "target_commitish": "main",
  "name": null,
  "draft": false,
  "author": {
    "login": "D055539",
    "id": 4192,
    "node_id": "MDQ6VXNlcjQxOTI=",
    "avatar_url": "https://avatars.github.domain.com/u/4192?",
    "gravatar_id": "",
    "url": "https://github.domain.com/api/v3/users/D055539",
    "html_url": "https://github.domain.com/D055539",
    "followers_url": "https://github.domain.com/api/v3/users/D055539/followers",
    "following_url": "https://github.domain.com/api/v3/users/D055539/following{/other_user}",
    "gists_url": "https://github.domain.com/api/v3/users/D055539/gists{/gist_id}",
    "starred_url": "https://github.domain.com/api/v3/users/D055539/starred{/owner}{/repo}",
    "subscriptions_url": "https://github.domain.com/api/v3/users/D055539/subscriptions",
    "organizations_url": "https://github.domain.com/api/v3/users/D055539/orgs",
    "repos_url": "https://github.domain.com/api/v3/users/D055539/repos",
    "events_url": "https://github.domain.com/api/v3/users/D055539/events{/privacy}",
    "received_events_url": "https://github.domain.com/api/v3/users/D055539/received_events",
    "type": "User",
    "site_admin": false
  },
  "prerelease": false,
  "created_at": "2021-05-05T11:30:18Z",
  "published_at": "2021-05-06T06:48:10Z",
  "assets": [

  ],
  "tarball_url": "https://github.domain.com/api/v3/repos/db/lbswtch/tarball/v0.0.0",
  "zipball_url": "https://github.domain.com/api/v3/repos/db/lbswtch/zipball/v0.0.0",
  "body": null
}

# upload asset
curl -H "Authorization: token TOKEN" -X POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17703/assets?name=foo -H 'Content-Type:application/octet-stream' -d@binary
{
  "url": "https://github.domain.com/api/v3/repos/db/lbswtch/releases/assets/8375",
  "id": 8375,
  "node_id": "MDEyOlJlbGVhc2VBc3NldDgzNzU=",
  "name": "foo",
  "label": null,
  "uploader": {
    "login": "D055539",
    "id": 4192,
    "node_id": "MDQ6VXNlcjQxOTI=",
    "avatar_url": "https://avatars.github.domain.com/u/4192?",
    "gravatar_id": "",
    "url": "https://github.domain.com/api/v3/users/D055539",
    "html_url": "https://github.domain.com/D055539",
    "followers_url": "https://github.domain.com/api/v3/users/D055539/followers",
    "following_url": "https://github.domain.com/api/v3/users/D055539/following{/other_user}",
    "gists_url": "https://github.domain.com/api/v3/users/D055539/gists{/gist_id}",
    "starred_url": "https://github.domain.com/api/v3/users/D055539/starred{/owner}{/repo}",
    "subscriptions_url": "https://github.domain.com/api/v3/users/D055539/subscriptions",
    "organizations_url": "https://github.domain.com/api/v3/users/D055539/orgs",
    "repos_url": "https://github.domain.com/api/v3/users/D055539/repos",
    "events_url": "https://github.domain.com/api/v3/users/D055539/events{/privacy}",
    "received_events_url": "https://github.domain.com/api/v3/users/D055539/received_events",
    "type": "User",
    "site_admin": false
  },
  "content_type": "application/octet-stream",
  "state": "uploaded",
  "size": 288548,
  "download_count": 0,
  "created_at": "2021-05-06T06:49:30Z",
  "updated_at": "2021-05-06T06:49:30Z",
  "browser_download_url": "https://github.domain.com/db/lbswtch/releases/download/v0.0.0/foo"
}

@anton-yurchenko
Copy link
Owner

Thanks, @cb80, this is an important piece of information.

So according to this, the initial approach was correct and two environmental variables should be used for client authentication.

I have built another version with upgraded dependencies, added some debug logs, set the client to use two URLs again (when we observed that media.domain.com host).

Please run it and provide the output as before.

@cb80
Copy link
Author

cb80 commented May 6, 2021

Hi @anton-yurchenko,

here we go:

Run docker://antonyurchenko/git-release:ghe-dev
/usr/local/bin/docker run --name antonyurchenkogitreleaseghedev_da7e60 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:ghe-dev cmd/lbswtchd/lbswtchd
cmd/lbswtchctl/lbswtchctl
INFO 'git-release' version: 3.6.0                 
WARNING 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'ALLOW_EMPTY_CHANGELOG' enabled              
WARNING 'ALLOW_TAG_PREFIX' enabled                   
WARNING 'CHANGELOG_FILE' is set to 'none'            
INFO running on GitHub Enterprise                 
DEBUG GITHUB_SERVER_URL env.var: https://github.domain.com 
DEBUG GITHUB_API_URL env.var: https://github.domain.com/api/v3 
DEBUG client BaseURL: https://github.domain.com/api/v3/ 
DEBUG client UploadURL: https://github.domain.com/api/uploads/ 
INFO creating release: 'v0.0.0'                   
INFO uploading asset: 'lbswtchctl'                
INFO uploading asset: 'lbswtchd'                  
ERROR POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17735/assets?name=lbswtchd: 502 Error uploading to https://media.github.domain.com/releases/17735/files: 404 [] 
ERROR POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17735/assets?name=lbswtchctl: 502 Error uploading to https://media.github.domain.com/releases/17735/files: 404 [] 
FATAL error uploading assets (release partially published) 

Do I have to approach our GHE admins?

@anton-yurchenko
Copy link
Owner

Thanks, @cb80

Can you try the same with different, simpler assets, like README.md or file.txt?

@cb80
Copy link
Author

cb80 commented May 6, 2021

Hi @anton-yurchenko

first of all thanks for your amazing support! I have created a ticket for our GHE admins to check where this media.github.domain.com comes from - let's see.

And as you proposed I tried with README.md but get the same error:

Run docker://antonyurchenko/git-release:ghe-dev
/usr/local/bin/docker run --name antonyurchenkogitreleaseghedev_00bde2 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:ghe-dev README.md
INFO 'git-release' version: 3.6.0                 
WARNING 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
WARNING 'ALLOW_EMPTY_CHANGELOG' enabled              
WARNING 'ALLOW_TAG_PREFIX' enabled                   
WARNING 'CHANGELOG_FILE' is set to 'none'            
INFO running on GitHub Enterprise                 
DEBUG GITHUB_SERVER_URL env.var: https://github.domain.com 
DEBUG GITHUB_API_URL env.var: https://github.domain.com/api/v3 
DEBUG client BaseURL: https://github.domain.com/api/v3/ 
DEBUG client UploadURL: https://github.domain.com/api/uploads/ 
INFO creating release: 'v0.0.0'                   
INFO uploading asset: 'README.md'                 
ERROR POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17741/assets?name=README.md: 502 Error uploading to https://media.github.domain.com/releases/17741/files: 404 [] 
FATAL error uploading assets (release partially published)

@anton-yurchenko
Copy link
Owner

With pleasure 😉 @cb80

I have created a ticket for our GHE admins to check where this media.github.domain.com comes from

This will be helpful!
Are you able to resolve that host by the way?

@cb80
Copy link
Author

cb80 commented May 6, 2021

@anton-yurchenko

I got the following answer from my GHE admins the media subdomain is a simple CNAME record, pointing to the main domain. You can check that using nslookup/dig. That separate subdomain is needed to have the ability to separate media onto a different server - which we did not use.

I can confirm this:

dig media.github.domain.com
...
;; ANSWER SECTION:
media.github.domain.com. 588     IN      CNAME   github.domain.com.
github.domain.com.       448     IN      A       <someIPaddress>
...

They also wrote As for your error - is there an ability to get more verbose output from that action? We would really like to see request-response logs, with all the headers and content (except authorization ones)

Can we somehow debug the requests/responses?

@anton-yurchenko
Copy link
Owner

@cb80

You may set a GODEBUG environmental variable to:

GODEBUG: "http2debug=1"   # enable verbose HTTP/2 debug logs
GODEBUG: "http2debug=2"   # ... even more verbose, with frame dumps

@cb80
Copy link
Author

cb80 commented May 7, 2021

@anton-yurchenko

fyi - I used GODEBUG: "http2debug=2" and got the output below. I'll also provide this to our GHE admins.

2021-05-07T06:44:51.2807343Z ##[group]Run docker://antonyurchenko/git-release:ghe-dev
2021-05-07T06:44:51.2807525Z with:
2021-05-07T06:44:51.2807661Z   args: README.md
2021-05-07T06:44:51.2807789Z env:
2021-05-07T06:44:51.2807914Z   CGO_ENABLED: 0
2021-05-07T06:44:51.2808058Z   GODEBUG: http2debug=2
2021-05-07T06:44:51.2808199Z   GOROOT: /runner/_work/_tool/go/1.16.3/x64
2021-05-07T06:44:51.2809243Z   GITHUB_TOKEN: ***
2021-05-07T06:44:51.2809395Z   CHANGELOG_FILE: none
2021-05-07T06:44:51.2809535Z   ALLOW_EMPTY_CHANGELOG: true
2021-05-07T06:44:51.2809666Z   ALLOW_TAG_PREFIX: true
2021-05-07T06:44:51.2809795Z ##[endgroup]
2021-05-07T06:44:51.2898998Z ##[command]/usr/local/bin/docker run --name antonyurchenkogitreleaseghedev_8083d5 --label 60e226 --workdir /github/workspace --rm -e CGO_ENABLED -e GODEBUG -e GOROOT -e GITHUB_TOKEN -e CHANGELOG_FILE -e ALLOW_EMPTY_CHANGELOG -e ALLOW_TAG_PREFIX -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/lbswtch/lbswtch":"/github/workspace" antonyurchenko/git-release:ghe-dev README.md
2021-05-07T06:44:52.2497600Z �[36mINFO�[0m 'git-release' version: 3.6.0                 
2021-05-07T06:44:52.2498159Z �[33mWARNING�[0m 'DRAFT_RELEASE' is not equal to 'true', assuming 'false' 
2021-05-07T06:44:52.2498588Z �[33mWARNING�[0m 'PRE_RELEASE' is not equal to 'true', assuming 'false' 
2021-05-07T06:44:52.2498942Z �[33mWARNING�[0m 'ALLOW_EMPTY_CHANGELOG' enabled              
2021-05-07T06:44:52.2499278Z �[33mWARNING�[0m 'ALLOW_TAG_PREFIX' enabled                   
2021-05-07T06:44:52.2499605Z �[33mWARNING�[0m 'CHANGELOG_FILE' is set to 'none'            
2021-05-07T06:44:52.2499930Z �[36mINFO�[0m running on GitHub Enterprise                 
2021-05-07T06:44:52.2500575Z �[37mDEBUG�[0m GITHUB_SERVER_URL env.var: https://github.domain.com 
2021-05-07T06:44:52.2501439Z �[37mDEBUG�[0m GITHUB_API_URL env.var: https://github.domain.com/api/v3 
2021-05-07T06:44:52.2501829Z �[37mDEBUG�[0m client BaseURL: https://github.domain.com/api/v3/ 
2021-05-07T06:44:52.2502216Z �[37mDEBUG�[0m client UploadURL: https://github.domain.com/api/uploads/ 
2021-05-07T06:44:52.2502576Z �[36mINFO�[0m creating release: 'v0.0.0'                   
2021-05-07T06:44:52.2505868Z 2021/05/07 06:44:52 http2: Transport failed to get client conn for github.domain.com:443: http2: no cached connection was available
2021-05-07T06:44:52.2843330Z 2021/05/07 06:44:52 http2: Transport creating client conn 0xc000582300 to <someIPaddress>:443
2021-05-07T06:44:52.2843926Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote SETTINGS len=18, settings: ENABLE_PUSH=0, INITIAL_WINDOW_SIZE=4194304, MAX_HEADER_LIST_SIZE=10485760
2021-05-07T06:44:52.2844150Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote WINDOW_UPDATE len=4 (conn) incr=1073741824
2021-05-07T06:44:52.2844376Z 2021/05/07 06:44:52 http2: Transport encoding header ":authority" = "github.domain.com"
2021-05-07T06:44:52.2844775Z 2021/05/07 06:44:52 http2: Transport encoding header ":method" = "POST"
2021-05-07T06:44:52.2844964Z 2021/05/07 06:44:52 http2: Transport encoding header ":path" = "/api/v3/repos/db/lbswtch/releases"
2021-05-07T06:44:52.2845151Z 2021/05/07 06:44:52 http2: Transport encoding header ":scheme" = "https"
2021-05-07T06:44:52.2846496Z 2021/05/07 06:44:52 http2: Transport encoding header "content-type" = "application/json"
2021-05-07T06:44:52.2846721Z 2021/05/07 06:44:52 http2: Transport encoding header "accept" = "application/vnd.github.v3+json"
2021-05-07T06:44:52.2847161Z 2021/05/07 06:44:52 http2: Transport encoding header "user-agent" = "go-github"
2021-05-07T06:44:52.2848744Z 2021/05/07 06:44:52 http2: Transport encoding header "authorization" = "Bearer ***"
2021-05-07T06:44:52.2849220Z 2021/05/07 06:44:52 http2: Transport encoding header "content-length" = "143"
2021-05-07T06:44:52.2849611Z 2021/05/07 06:44:52 http2: Transport encoding header "accept-encoding" = "gzip"
2021-05-07T06:44:52.2849799Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote HEADERS flags=END_HEADERS stream=1 len=136
2021-05-07T06:44:52.2850072Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote DATA flags=END_STREAM stream=1 len=143 data="{\"tag_name\":\"v0.0.0\",\"target_commitish\":\"a1c7820442b687da3bbabbd135175cf9db818d04\",\"name\":\"v0.0.0\",\"body\":\"\",\"draft\":false,\"prerelease\":false}\n"
2021-05-07T06:44:52.2871191Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read SETTINGS len=18, settings: MAX_CONCURRENT_STREAMS=100, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=65536
2021-05-07T06:44:52.2871485Z 2021/05/07 06:44:52 http2: Transport received SETTINGS len=18, settings: MAX_CONCURRENT_STREAMS=100, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=65536
2021-05-07T06:44:52.2871696Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote SETTINGS flags=ACK len=0
2021-05-07T06:44:52.2873712Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read WINDOW_UPDATE len=4 (conn) incr=983041
2021-05-07T06:44:52.2873942Z 2021/05/07 06:44:52 http2: Transport received WINDOW_UPDATE len=4 (conn) incr=983041
2021-05-07T06:44:52.2874126Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read SETTINGS flags=ACK len=0
2021-05-07T06:44:52.2874307Z 2021/05/07 06:44:52 http2: Transport received SETTINGS flags=ACK len=0
2021-05-07T06:44:52.4400590Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read HEADERS flags=END_HEADERS stream=1 len=772
2021-05-07T06:44:52.4403453Z 2021/05/07 06:44:52 http2: decoded hpack field header field ":status" = "201"
2021-05-07T06:44:52.4403712Z 2021/05/07 06:44:52 http2: decoded hpack field header field "server" = "github.com"
2021-05-07T06:44:52.4403937Z 2021/05/07 06:44:52 http2: decoded hpack field header field "date" = "Fri, 07 May 2021 06:44:52 GMT"
2021-05-07T06:44:52.4405210Z 2021/05/07 06:44:52 http2: decoded hpack field header field "content-type" = "application/json; charset=utf-8"
2021-05-07T06:44:52.4410544Z 2021/05/07 06:44:52 http2: decoded hpack field header field "content-length" = "1932"
2021-05-07T06:44:52.4411031Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-ratelimit-limit" = "1000"
2021-05-07T06:44:52.4411436Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-ratelimit-remaining" = "982"
2021-05-07T06:44:52.4411839Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-ratelimit-reset" = "1620372995"
2021-05-07T06:44:52.4412280Z 2021/05/07 06:44:52 http2: decoded hpack field header field "cache-control" = "private, max-age=60, s-maxage=60"
2021-05-07T06:44:52.4412715Z 2021/05/07 06:44:52 http2: decoded hpack field header field "vary" = "Accept, Authorization, Cookie, X-GitHub-OTP"
2021-05-07T06:44:52.4412930Z 2021/05/07 06:44:52 http2: decoded hpack field header field "etag" = "\"f828ade0e4a0775590cc2f22dce64dff\""
2021-05-07T06:44:52.4413340Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-github-enterprise-version" = "2.22.10"
2021-05-07T06:44:52.4413609Z 2021/05/07 06:44:52 http2: decoded hpack field header field "location" = "https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764"
2021-05-07T06:44:52.4414077Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-github-media-type" = "github.v3; format=json"
2021-05-07T06:44:52.4415118Z 2021/05/07 06:44:52 http2: decoded hpack field header field "access-control-expose-headers" = "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset"
2021-05-07T06:44:52.4415644Z 2021/05/07 06:44:52 http2: decoded hpack field header field "access-control-allow-origin" = "*"
2021-05-07T06:44:52.4416102Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-github-request-id" = "604846be-7b96-46b0-8307-8ca1e76f9566"
2021-05-07T06:44:52.4416557Z 2021/05/07 06:44:52 http2: decoded hpack field header field "strict-transport-security" = "max-age=31536000; includeSubdomains"
2021-05-07T06:44:52.4416961Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-frame-options" = "deny"
2021-05-07T06:44:52.4417359Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-content-type-options" = "nosniff"
2021-05-07T06:44:52.4417754Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-xss-protection" = "1; mode=block"
2021-05-07T06:44:52.4418220Z 2021/05/07 06:44:52 http2: decoded hpack field header field "referrer-policy" = "origin-when-cross-origin, strict-origin-when-cross-origin"
2021-05-07T06:44:52.4418649Z 2021/05/07 06:44:52 http2: decoded hpack field header field "content-security-policy" = "default-src 'none'"
2021-05-07T06:44:52.4419065Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-runtime-rack" = "0.143169"
2021-05-07T06:44:52.4419322Z 2021/05/07 06:44:52 http2: decoded hpack field header field "via" = "1.1 google"
2021-05-07T06:44:52.4419786Z 2021/05/07 06:44:52 http2: decoded hpack field header field "alt-svc" = "clear"
2021-05-07T06:44:52.4419984Z 2021/05/07 06:44:52 http2: Transport received HEADERS flags=END_HEADERS stream=1 len=772
2021-05-07T06:44:52.4420327Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read DATA stream=1 len=1932 data="{\"url\":\"https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764\",\"assets_url\":\"https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764/assets\",\"upload_url\":\"https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17764/assets{?name,l" (1676 bytes omitted)
2021-05-07T06:44:52.4420851Z 2021/05/07 06:44:52 http2: Transport received DATA stream=1 len=1932 data="{\"url\":\"https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764\",\"assets_url\":\"https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764/assets\",\"upload_url\":\"https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17764/assets{?name,l" (1676 bytes omitted)
2021-05-07T06:44:52.4421177Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read DATA flags=END_STREAM stream=1 len=0 data=""
2021-05-07T06:44:52.4421533Z 2021/05/07 06:44:52 http2: Transport received DATA flags=END_STREAM stream=1 len=0 data=""
2021-05-07T06:44:52.4424515Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read PING len=8 ping="\x00\x00\x00\x00\x00\x00\x00\x00"
2021-05-07T06:44:52.4424742Z 2021/05/07 06:44:52 http2: Transport received PING len=8 ping="\x00\x00\x00\x00\x00\x00\x00\x00"
2021-05-07T06:44:52.4424951Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote PING flags=ACK len=8 ping="\x00\x00\x00\x00\x00\x00\x00\x00"
2021-05-07T06:44:52.4425141Z 2021/05/07 06:44:52 http2: Transport encoding header ":authority" = "github.domain.com"
2021-05-07T06:44:52.4425321Z 2021/05/07 06:44:52 http2: Transport encoding header ":method" = "POST"
2021-05-07T06:44:52.4425523Z 2021/05/07 06:44:52 http2: Transport encoding header ":path" = "/api/uploads/repos/db/lbswtch/releases/17764/assets?name=README.md"
2021-05-07T06:44:52.4425719Z 2021/05/07 06:44:52 http2: Transport encoding header ":scheme" = "https"
2021-05-07T06:44:52.4426284Z 2021/05/07 06:44:52 http2: Transport encoding header "content-type" = "application/octet-stream"
2021-05-07T06:44:52.4426478Z 2021/05/07 06:44:52 http2: Transport encoding header "accept" = "application/vnd.github.v3+json"
2021-05-07T06:44:52.4428071Z 2021/05/07 06:44:52 http2: Transport encoding header "authorization" = "Bearer ***"
2021-05-07T06:44:52.4428727Z 2021/05/07 06:44:52 http2: Transport encoding header "user-agent" = "go-github"
2021-05-07T06:44:52.4429159Z 2021/05/07 06:44:52 http2: Transport encoding header "content-length" = "2213"
2021-05-07T06:44:52.4429530Z 2021/05/07 06:44:52 http2: Transport encoding header "accept-encoding" = "gzip"
2021-05-07T06:44:52.4429716Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote HEADERS flags=END_HEADERS stream=3 len=80
2021-05-07T06:44:52.4429990Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote DATA flags=END_STREAM stream=3 len=2213 data="blablabla" (1957 bytes omitted)
2021-05-07T06:44:52.4430434Z �[36mINFO�[0m uploading asset: 'README.md'                 
2021-05-07T06:44:52.5966653Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read HEADERS flags=END_HEADERS stream=3 len=92
2021-05-07T06:44:52.5966956Z 2021/05/07 06:44:52 http2: decoded hpack field header field ":status" = "502"
2021-05-07T06:44:52.5967161Z 2021/05/07 06:44:52 http2: decoded hpack field header field "server" = "github.com"
2021-05-07T06:44:52.5967377Z 2021/05/07 06:44:52 http2: decoded hpack field header field "date" = "Fri, 07 May 2021 06:44:52 GMT"
2021-05-07T06:44:52.5968434Z 2021/05/07 06:44:52 http2: decoded hpack field header field "content-type" = "application/json; charset=utf-8"
2021-05-07T06:44:52.5968871Z 2021/05/07 06:44:52 http2: decoded hpack field header field "content-length" = "141"
2021-05-07T06:44:52.5969301Z 2021/05/07 06:44:52 http2: decoded hpack field header field "cache-control" = "no-cache"
2021-05-07T06:44:52.5969735Z 2021/05/07 06:44:52 http2: decoded hpack field header field "content-security-policy" = "default-src 'none'"
2021-05-07T06:44:52.5970168Z 2021/05/07 06:44:52 http2: decoded hpack field header field "strict-transport-security" = "max-age=31557600"
2021-05-07T06:44:52.5970592Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-content-type-options" = "nosniff"
2021-05-07T06:44:52.5970989Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-frame-options" = "deny"
2021-05-07T06:44:52.5971495Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-github-request-id" = "b9f1c2ff-aeff-11eb-831c-a160f85398b5"
2021-05-07T06:44:52.5971917Z 2021/05/07 06:44:52 http2: decoded hpack field header field "x-xss-protection" = "1; mode=block"
2021-05-07T06:44:52.5972115Z 2021/05/07 06:44:52 http2: decoded hpack field header field "via" = "1.1 google"
2021-05-07T06:44:52.5972853Z 2021/05/07 06:44:52 http2: decoded hpack field header field "alt-svc" = "clear"
2021-05-07T06:44:52.5973049Z 2021/05/07 06:44:52 http2: Transport received HEADERS flags=END_HEADERS stream=3 len=92
2021-05-07T06:44:52.5973958Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read DATA stream=3 len=141 data="{\"message\":\"Error uploading to https://media.github.domain.com/releases/17764/files: 404\",\"request_id\":\"b9f1c2ff-aeff-11eb-831c-a160f85398b5\"}"
2021-05-07T06:44:52.5974962Z 2021/05/07 06:44:52 http2: Transport received DATA stream=3 len=141 data="{\"message\":\"Error uploading to https://media.github.domain.com/releases/17764/files: 404\",\"request_id\":\"b9f1c2ff-aeff-11eb-831c-a160f85398b5\"}"
2021-05-07T06:44:52.5975238Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read DATA flags=END_STREAM stream=3 len=0 data=""
2021-05-07T06:44:52.5975435Z 2021/05/07 06:44:52 http2: Transport received DATA flags=END_STREAM stream=3 len=0 data=""
2021-05-07T06:44:52.5975648Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: read PING len=8 ping="\x00\x00\x00\x00\x00\x00\x00\x02"
2021-05-07T06:44:52.5975857Z 2021/05/07 06:44:52 http2: Transport received PING len=8 ping="\x00\x00\x00\x00\x00\x00\x00\x02"
2021-05-07T06:44:52.5976063Z 2021/05/07 06:44:52 http2: Framer 0xc000186380: wrote PING flags=ACK len=8 ping="\x00\x00\x00\x00\x00\x00\x00\x02"
2021-05-07T06:44:52.5976880Z �[31mERROR�[0m POST https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17764/assets?name=README.md: 502 Error uploading to https://media.github.domain.com/releases/17764/files: 404 [] 
2021-05-07T06:44:52.5977464Z �[31mFATAL�[0m error uploading assets (release partially published) 

@anton-yurchenko
Copy link
Owner

anton-yurchenko commented May 7, 2021

Thanks, @cb80

Action is configured according to a GHE Environment:

2021-05-07T06:44:52.2501829Z �[37mDEBUG�[0m client BaseURL: https://github.domain.com/api/v3/ 
2021-05-07T06:44:52.2502216Z �[37mDEBUG�[0m client UploadURL: https://github.domain.com/api/uploads/ 

Moreover, a GHE API returns an upload_url after a release creation, and it also matches the configuration:

2021-05-07T06:44:52.4420851Z 2021/05/07 06:44:52 http2: Transport received DATA stream=1 len=1932 data="{\"url\":\"https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764\",\"assets_url\":\"https://github.domain.com/api/v3/repos/db/lbswtch/releases/17764/assets\",\"upload_url\":\"https://github.domain.com/api/uploads/repos/db/lbswtch/releases/17764/assets{?name,l" (1676 bytes omitted)

(Precisely this: "upload_url":"https://github.domain.com/api/uploads/...")
This is matches exactly the GHE Environment which is feeding the action.

I believe the root cause is a DNS CNAME media.github.domain.com, although it seems to be designed that way. *(probably a NAS server as an artifactory or something like that)


Update: reply from GitHub support:

[...] the URL which should be used for download is the one returned in the upload_url value when creating the release [...]

@cb80
Copy link
Author

cb80 commented May 7, 2021

@anton-yurchenko
You won't believe it: the issue happens with GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} but not with GITHUB_TOKEN: <some hard coded personal token>. I don't understand why, but by changing that line I was able to create a release and upload assets. I'll keep you posted. Have a great weekend!

@anton-yurchenko anton-yurchenko added v4 Release v4.x.x and removed v3 Release v3.x.x labels May 8, 2021
@cb80
Copy link
Author

cb80 commented May 14, 2021

I am certain that our GHE instance creates a token without the needed permissions. I mean using a different token than the auto generated one worked fine. So I guess your changes to support GitHub enterprise were successful.

@cb80 cb80 closed this as completed May 14, 2021
@anton-yurchenko
Copy link
Owner

Great news @cb80!

I am leaving that Issue open until a GHE support is released as a part of an upcoming v4.0.0. Action tag ghe-dev will be available until then without support whatsoever.

Thanks for your help!

@stevenh
Copy link

stevenh commented Jan 19, 2022

@cb80 did you ever get an answer from github support on why secrets.GITHUB_TOKEN doesn't have the right permission on Github Enterprise?

@cb80
Copy link
Author

cb80 commented Jan 20, 2022

@stevenh That's a long time ago :-) and no, I haven't received a good answer. However, there seem to be many ways to restrict the permissions of the token. Luckily there is some documentation available which may help you:

@stevenh
Copy link

stevenh commented Jan 21, 2022

Thanks for that, I will have a look.

I've raised a support ticket to see if we can't get to the bottom the difference behind github.com and enterprise versions. Will report back if we get a solution.

@stevenh
Copy link

stevenh commented Feb 9, 2022

So it is a bug and will be fixed, here's the response from github support we got this morning:

Uploading release assets using GITHUB_TOKEN is planed to be supported in GitHub Enterprise Server 3.5.
At this time it is estimated to be released at the end of May.
Until then the use of a personal access token will be needed.

So until GitHub Enterprise 3.5 is release we'll need to keep using personal access tokens.

@anton-yurchenko
Copy link
Owner

Thanks @stevenh 👑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v4 Release v4.x.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants