https://pulumi.com logo
Title
c

colossal-vr-62639

01/30/2023, 7:57 AM
Has anyone managed to get the GitHub Pulumi Provider to work? I'm just trying to create an environment in a repository and the issue i'm facing is that the GITHUB_OWNER environment variable doesn't appear to do anything and it's failing constructing the correct url to interact with.
Diagnostics:
  github:index:RepositoryEnvironment (preproduction):
    error: PUT <https://api.github.com/repos//pulumi-sample/environments/preproduction>: 404 Not Found []

  github:index:RepositoryEnvironment (sandbox):
    error: PUT <https://api.github.com/repos//pulumi-sample/environments/sandbox>: 404 Not Found []
The value for the GitHub owner should be where the double
//
are after
repos
l

limited-rainbow-51650

01/30/2023, 8:45 AM
For Pulumiverse, I haven’t used the environment variable, but it does work setting the value using stack config: https://github.com/pulumiverse/infra/blob/main/Pulumi.prod.yaml
c

colossal-vr-62639

01/30/2023, 8:50 AM
@limited-rainbow-51650 that had no effect for me either. Would you be able to verify whether this works for the latest version of the GitHub Provider which is 5.3.0?
I am trying to create a GitHub Environment
var githubEnvironment = new RepositoryEnvironment(environmentName, new RepositoryEnvironmentArgs
        {
            Environment = "sandbox",
            Repository = "sample-pulumi"
        });
The repository is under my username
pgermishuys
and is private.
l

limited-rainbow-51650

01/30/2023, 8:58 AM
@colossal-vr-62639 checking the sources for this. There is something missing as far as I can see.
c

colossal-vr-62639

01/30/2023, 8:59 AM
You mean there is something i'm missing?
l

limited-rainbow-51650

01/30/2023, 9:01 AM
No, the sources are missing some things. The readme of the provider lists a number of env variables: https://github.com/pulumi/pulumi-github/blob/master/README.md#configuration While I only see the base url as part of our provider config in the sources: https://github.com/pulumi/pulumi-github/blob/master/provider/resources.go#L81-L88
c

colossal-vr-62639

01/30/2023, 9:02 AM
Yeah, it leads me to believe that the provider doesn't work at all. It's another reason why i'm curious about your setup for PulumiVerse as I can't get something simple like this working with the provider.
If it's a regression, I was hoping i'd be able to use the version that you used in the interim.
l

limited-rainbow-51650

01/30/2023, 9:30 AM
This is strange. For the Pulumiverse infra setup, I moved the github provider version from 4.12.0 (in use so far) version by version to 5.3.0 to see if I could bump into a regression. I couldn’t so far. Let me try this for a new stack.
@colossal-vr-62639 I was able to reproduce your experience, but due to the
GITHUB_TOKEN
not correctly set. Once I configured my token correctly, the problem was gone. Can you verify your GH credentials?
c

colossal-vr-62639

01/30/2023, 9:49 AM
That was it! 🙂 thank you kindly!
l

limited-rainbow-51650

01/30/2023, 9:51 AM
No problem.