-
Notifications
You must be signed in to change notification settings - Fork 60
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
json: cannot unmarshal array into Go value of type github.Repository #96
Comments
Hi @matross-gh thanks for filing an issue! If you could could you let us know what version of |
@shawnHartsell Hi there! Sure thing! I am using GHES Actions Sync v0.2 obtained from issuing the command actions-sync version. |
@matross-gh I was able to repro this, and admit should have seen the problem sooner 😢. I believe you're encountering this issue b/c your using Details When In the case of creating a repo (the last action in the Below is an example taken from one of my test GHES instance via
|
@shawnHartsell Wow! Thank you! That worked! I can't believe I did that! sheesh! Using same version with same tooling on my laptop, no change there. Command (with HTTPS on --destination-url parameter) Pardon the use of ghe-admin, just forming the repeatable process here. I will be using a different account for this action. Thank you very much and my apologies for such a late reply! |
Quick Note - This whole thing could simply be that at one time I thought that actions-sync created the organization if it did not exist, then created the repository, again if it did not exist, then finally push the repo. Just to REALLY sort things out, I event did the command: gh-org-admin-promote -u ghe-admin -o actions.
Error
json: cannot unmarshal array into Go value of type github.Repository
Command
actions-sync sync --cache-dir 'c:\temp' --destination-token 'abc123' --destination-url 'http://
<serverFQDN
>' --repo-name docker/bake-actionEnvironment
Windows 11 23H2 (OS Build 22631.3007)
PowerShell 7.4.1
Go v1.21.6
Chocolatey v2.2.2
Note: I am using this to test the process. I have a classic token which as the following rights: admin:enterprise, admin:org, repo, site_admin, workflow
Narrative
I have the latest version of actions-sync saved in my c:\program files\dotnet directory. This directory is in the path. I am using PowerShell 7.4.1 to execute the command as noted above. I am attempting to sync from my Windows workstation to a GitHub Version 3.10.5 instance.
Expectations
sync the repository of my choice from https://github.com to my instance using actions-sync and the sync command. If organization does not exist, the tool creates the organization then creates the repository and pushes the fetched repository to the newly created organization and repository. Could be me, but I thought earlier versions did this?
Steps and Outcomes
Note: I am using this to test the process. I have a classic token which as the following rights: admin:enterprise, admin:org, repo, site_admin, workflow
actions-sync sync --cache-dir 'c:\temp' --destination-token 'abc123' --destination-url 'http://myserver' --repo-name docker/bake-action
docker/bake-action
: error creating organization docker: GET https://myserver/api/v3/admin/organizations: 404 Not Found []At this point, I go and create the docker organization in my instance and re-issue the command
actions-sync sync --cache-dir 'c:\temp' --destination-token 'abc123' --destination-url 'http://myserver' --repo-name docker/bake-action
docker/bake-action
: error creating repository docker/bake-action: json: cannot unmarshal array into Go value of type github.RepositoryAt this point I create the bake-action repository in the docker organization and re-issue the command
actions-sync sync --cache-dir 'c:\temp' --destination-token 'abc123' --destination-url 'http://myserver' --repo-name docker/bake-action
fetching * refs for docker/bake-action ...
not using impersonation for the requests
syncing
docker/bake-action
Existing repo
docker/bake-action
successfully synced
docker/bake-action
The text was updated successfully, but these errors were encountered: