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

git branch issue when running in ci environment #84

Closed
jabalsad opened this issue Jan 31, 2023 · 2 comments
Closed

git branch issue when running in ci environment #84

jabalsad opened this issue Jan 31, 2023 · 2 comments
Labels
question Further information is requested

Comments

@jabalsad
Copy link

jabalsad commented Jan 31, 2023

Hello,

I seem to have an oddity between my local environment and a github actions environment. Some context:

  • gomarkdoc v0.4.1
  • go v1.19.5
  • the repository is a private github repository

I'm using github actions to run gomarkdoc, but with debug logging i see the following error:

skipping remote https://github.com/private/go-lib-env because no default branch was found

Strangely enough, on my local machine this does not happen:

DEBUG found default branch main for remote git@github.private/go-lib-env.git dir=./pkg/env

All my other go tools work just fine:

  • i use git config --global url."https://username:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com" to configure https access to the git repos
  • i also set export GOPRIVATE=github.com/private for access to private repos.

I still can't quite figure out why this doesn't work on the github actions build server.

@princjef
Copy link
Owner

Hi @jabalsad, this is actually a common scenario in CI environments due to how they perform checkout of the repository. The various repository options are available to ensure reliable builds/linking across environments: https://github.com/princjef/gomarkdoc#additional-options

For CI of gomarkdoc itself, these options are specified in the .gomarkdoc.yml file

Give it a shot and see if that solves your problem

@princjef princjef added the question Further information is requested label Jun 12, 2023
@princjef
Copy link
Owner

Marking this closed as the solution above should resolve the issue. Feel free to reopen if it doesn't work for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants