-
Notifications
You must be signed in to change notification settings - Fork 74
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
Can't sync with private repo #16
Comments
I'm having the same error of "Repository not found" when trying to merge a private repo via HTTPS. In an attempt to debug, I've run this action locally, using nektos/act. What's weird is that everything works perfectly when I run this action locally. (I.e., no "Repository not found" error.) As soon as I publish and use the action on GitHub, I get the same error as @veerendra2 (albeit, without using the SSH URL). FWIW - I'm using the @nektos local runner from here: https://hub.docker.com/r/nektos/act-environments-ubuntu/tags?page=1&ordering=last_updated As far as I can tell, the only major difference is that the local runner is using Git 2.25.0, while GitHub's runner is using 2.29.2, IIRC. I'm not sure if that's the issue, or whether GitHub's runner is stripping out the TOKEN from the remote/upstream URL. BTW @veerendra2, I'm not sure your solution to utilize the ssh url will work. I think that this action is only works on HTTPS.
|
@veerendra2 I see a couple of issues here, so let's see if we can drill down to the underlying problem you're having. First, @bdaley is correct - this action only works with HTTPS right now. This is not your core problem, but I added #17 to note this. Second, I noticed two problems related to the
Using the entire URL would not work (as you've seen). So between these two issues - using a remote repo you don't own OR having the wrong URL - would fixing either of these solve your problem? Let me know. (@bdaley - No idea about nektos, sorry. Happy to look at your workflow/action log, though.) |
@veerendra2 Actually, I made a mistake. My code is fine. #18 was not a bug. So my only idea for you is to check your input variable and make sure you aren't using the full repo link. Let me know if this works. |
I am having the same problem as @veerendra2. We have access to a private repo from another company with our github account. So on a local machine or a server I can clone / update this repo with I now stored our PERSONAL_ACCESS_TOKEN in a secret on the workflow repo as ADMIN_TOKEN and added this secret in the configuration together with the private repo: So the upstream repo with my configuration injected should look like this: So this should work at first glance, but I do not know what GITHUB_ACTOR does and if it could cause problems. I am also getting: |
I can't think of any reason why this would suddenly stop working, though. I'll continue to look into it. And let me know what release versions you're all using, please. In the meantime, please try latest - v2.3 There was a mixup with the user/email config data before around the same time this all started. I don't see why that would cause this issue, but who knows at this point? |
Thanks, @aormsby! The repo that I was trying to merge from was not my own, but I do have collaborator access to it. FWIW - I was using v2.2 when I ran into this issue, but I'll give 2.3 a try and report back. |
Thank you for the explanation @aormsby. i tried it with version 2.3 as I was using version 2.2 before too. |
@tobytes Okay, good to know. I'm working on setting up a new test case, but I may not have much time for it until next weekend. I'll update when I can. |
@aormsby Any news regarding this issue? |
Hi everyone, I've been too busy with my current work to sit down with this recently. I apologize for the delay on my end, and I want to thank you for trying things out on your end. I have some notes from previous work on another computer that I'll post here later. Perhaps they will further the conversation in the meantime. Thanks for your patience. |
@aormsby any further updates on this am also facing the issue where I have contributor access to a private repo and I have to update the fork with original upstream. The error am getting is /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
Error: The process '/usr/bin/git' failed with exit code 1 |
I had a problem with this as well. But got it fixed after adding my pat token to the checkout. It seems the problem is not with this action, but how you checkout the repository.
|
Yes, I do think authentication during the checkout process is key to this action working as expected, and I plan on adding something about that in the readme in coming updates. v2 is also missing much needed tests to verify repo connections and authenticated access, which is something I'm working on for v3. Hopefully, that will help deal with config issues in a more straightforward way. Will update when something is ready, should be pretty soon. |
I have a solution! So - the problem with accessing a private upstream repository is actually not the upstream access token. That should be working fine. What I found out during my v3 update is that when the first step checkout action has What you have to do is set As of right now, v2 actually doesn't support this. But v3 does! I recommend trying v3 available in PR #31 and letting me know if the private repos work for you. (In fact, try test mode!) I will also add this change to v2 since it's pretty crucial to the whole private sync. |
Input changed and readme updated in v2.4 and v3.0 |
I want to sync my private repo with other original private repo. I have added secrets to forked repo and ran workflow. But I get struck by below error
From this question --> https://stackoverflow.com/questions/56269686/git-repository-not-found-error-for-private-repository-on-github
I understood, I have to use SSH. So, manually specified ssh url like below
Got blow error. It is appending HTTP url to exiting one
My workflow file
The text was updated successfully, but these errors were encountered: