You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
github_repository does not have attribute http_clone_url error #77
I want to create repository and initialize git locally after successful creation. Accoding to the doc providers/github there is the attribute http_clone_url. So my .tf file looks like this.
* null_resource.init_local: 1 error(s) occurred:
* Resource 'github_repository.sandbox' does not have attribute 'http_clone_url' for variable 'github_repository.sandbox.
http_clone_url'
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
So it seems this attribute does not exist? Or I am doing something wrong?
I can't see anything wrong offhand, my only thought is its possibly an older version? Can you put the debug output in the issue (see the issue template)?
I tried lapots, lapots-github, github-lapots and others but it returns 404 on
* github_repository.sandbox: POST https://api.github.com/orgs/lapots/repos: 404 Not Found []
because the user itself doesn't have organizations
GET https://api.github.com/users/lapots/orgs
Thank you all for taking the time to debug this. Based on all the information provided here I'm going to close this in favour of #45 as I believe that issue is slightly more accurate in reflecting where the problem is and how it needs to be addressed.
Activity
paultyng commentedon Mar 8, 2018
I can't see anything wrong offhand, my only thought is its possibly an older version? Can you put the debug output in the issue (see the issue template)?
lapots commentedon Mar 12, 2018
Hi!
Sorry for late response
Here is the link to log gist debug log
paultyng commentedon Mar 13, 2018
So it looks like in some cases the blank organization name is a problem? (see this log entry)
I would try explicitly setting your organization to your name.
paultyng commentedon Mar 13, 2018
Its actually marked as required in the code so looks like just a typo on the website.
lapots commentedon Mar 13, 2018
Well possible it is due to no organization. Hm.
As I don't have an organization I set it as empty and it worked. It even created the repository with the initial commit just fine.
paultyng commentedon Mar 13, 2018
Can you try just
lapotsas the org?lapots commentedon Mar 13, 2018
I tried
lapots,lapots-github,github-lapotsand others but it returns404onbecause the user itself doesn't have organizations
returns empty list
paultyng commentedon Mar 13, 2018
😢 ok I will dig in a little. Per those other issues it does seem like we don't support personal repos, I have only used this against an org.
lapots commentedon Mar 13, 2018
I see 😭 Then I'll just create url in
.tfmanuallylapots commentedon Mar 15, 2018
@paultyng
I dug into the code
For
Createfunction in go-github library, second parameter wasorgand in case of empty it useduser/reposURL instead oforgs/%v/repos.https://github.com/google/go-github/blob/master/github/repos.go#L267
It created repositories just fine due to that.
For
Getfunction it requiresowneras a second parameter.https://github.com/google/go-github/blob/master/github/repos.go#L292
But in provider implementation it passes organization name both times
https://github.com/lapots/terraform-provider-github/blob/master/github/resource_github_repository.go#L154
https://github.com/terraform-providers/terraform-provider-github/blob/master/github/resource_github_repository.go#L168
radeksimko commentedon Aug 15, 2018
Thank you all for taking the time to debug this. Based on all the information provided here I'm going to close this in favour of #45 as I believe that issue is slightly more accurate in reflecting where the problem is and how it needs to be addressed.