Has anyone managed to get the GitHub Pulumi Provid...
# general
c
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.
Copy code
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
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
@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
Copy code
var githubEnvironment = new RepositoryEnvironment(environmentName, new RepositoryEnvironmentArgs
        {
            Environment = "sandbox",
            Repository = "sample-pulumi"
        });
The repository is under my username
pgermishuys
and is private.
l
@colossal-vr-62639 checking the sources for this. There is something missing as far as I can see.
c
You mean there is something i'm missing?
l
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
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
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
That was it! 🙂 thank you kindly!
l
No problem.