Can't fork a repository on GitHub - github

I'm trying to fork this repository, but getting an error message:
You can't fork this repository at this time.
I've read the license, and tried forking from another computer using VPN, in case of security conflict of my browser and GitHub, but it still don't work, and I can't even guess why so. Please tell me, what am I doing wrong?

This also happens if the user has blocked you
Tested today, May 2021.
A similar related message if you try to open an issue on a repository whose owner blocked you is:
You can't perform that action at this time.
You can just manually create a new repository and reupload the code there however. You just won't be able to send pull requests.

That sounds like a temporary GitHub issue.
Creating a fork isn't dependent of a license or vpn. It's just a http call in your browser.
Update: I forked the repo without issue.

If you already have a fork of the original repo, you cannot have another fork.
You can add the other repo as a remote though and use code from there.

Related

How can I 'unfork' in GitHub Desktop?

I have forked a public Github repo using the Mac GitHub Desktop client, so I can make some changes and submit them.
I have got my fork into a total mess (I am not used to working with forks) and want to start over, but I cannot find a way to tell the client my repo should track the original repo rather than my fork... it seems irrevocably bound to my fork.
How can I get the client app to forget I have a fork?
I'll put up what I found by trial and error, but someone might have a better way:
I basically deleted my repo (form) on Github, and automagically the GitHub client showed my local repo now linked to the original repo again. I was able to go through the process of creating a fork all over again with my changes.

GitHub main/master branch

I thought the default head branch was now called "main", but today, I noticed in a new repo, the default branch was still called "master". But when I wanted to rename it, the popup told me that I should use main?
My colleagues did see main as default, so I'm wondering, why don't I? Am I using an old version or something?
Although I don't see what repo is this related to, what you experience is most likely seeing your own fork instead of the upstream repository.
If your colleagues see main as the master branch and you see master on your side, check whether you don't have your username as a prefix in the repo URL or title (that'd be your fork) and instead try to navigate into the upstream repository (the one without your username as a prefix).
Unless you use a GitHub desktop client the version will be the same as your colleagues have because it's being served by the GitHub servers for all the users (kind of, ignoring A/B testing, load-balancing, CDN, etc) and only GitHub can change the version.
If you use the desktop client, always try to update first before opening tickets/questions as issues might have already been resolved

Recover a deleted repository github issues

My repository in the github had been deleted.
The code was recovered, but we had a lot of Github issues i'd like to recover, is there a way to recover them once deleted?
Thanks.
You need to email support#github.com as soon as possible when this happens.
I accidentally deleted our main GitHub repository instead of my own fork. I emailed support#github.com like Paul Betts suggested.
After about 10 minutes the support replied and the original repository was recovered.
I accidentally deleted my important repository and when tried the above-suggested methods, got to know that the process has been updated.
Please follow the steps provided in the link to recover the repository all by yourself.
Link - https://docs.github.com/en/github/administering-a-repository/restoring-a-deleted-repository
Note - You can only restore repositories that have no forks or have not been forked. (As per mentioned under Settings >> Repositories >> Deleted Repositories section)
Also, for any Github-related support requests, one needs to raise the support request through Github's support website.
Link - https://support.github.com/ (works for any GitHub related support)

GitHub-2-GitHub issues import

As you know GitHub has introduced a Repo Transfer feature. https://github.com/blog/876-repo-transfers
This allows you to change ownership of your root repos, not forking them with your organization. However, if you have already forked a repo and want to dump all its open issues to newly created one, what should you do?
Is there any solution on GitHub-2-GitHub issues import?
Though Tekkub answer makes sense, I still implemented a short script to transfer issues:
github.com/..../gh-issues-import
You should delete the newly created one and transfer the repo instead. Transferring repo ownership takes the issues with it.
Tekkub wrote a not-so-well-received answer (-2 as of this writing): "You should delete the newly created one and transfer the repo instead. Transferring repo ownership takes the issues with it." He isn't wrong; he just didn't walk through any of the considerations and gotchas. I'll enumerate a few of those below ...
Only Works if you have "admin" access to the parent repo:
In my case, I couldn't use repo-migration because I don't "own" the parent repo so I can't authorize the transfer (parent repo in the hands of a team-member who left). So it doesn't work for me. HOWEVER ... if you do in fact have admin privileges to the parent repo you are migrating, then using the "transfer repo" function is distinctly better and nowhere near as hard as it sounds.
Git history - trivial to keep
One of the commenters expressed concern over the new repo having its own history they don't want to lose. Well, that's the magic of git as a distributed VCS. You simply pull down all branches and tags and everything else to your local repo and then push that history up to the repo you are going to migrate.
git remote add origin1 https://github.com/blah/blah
git remote add origin2 https://github.com/blah/blah
git pull origin1
git push origin2
If you've created issues in both repos ... well that's screwed
Decide which repo has more important content, use that as the base, and port everything else into there. It's a "merge". good luck. The gh-issues-import.py script script posted by ibo.ezhe helps, but it doesn't restore comments on the issues. Feel free to improve it and send him a PullRequest (I did).
There's a Chrome Extension called Kamino that my colleague wrote. It's open source, and works extraordinarily well. It's more for copying issues individually, but he's looking at doing bulk copies as well.
Available here: https://chrome.google.com/webstore/detail/kamino/ffdebockfdjileaojbbccofhgncmioaf
Source code:
http://github.com/gatewayapps/kamino

GitHuB repository to remote server

Is there anyway I can push changes from my Github Repository to a remote server automatically?
I would like to deploy changes in master branch in my github repository to a remote deployment server. If possible.
I think you could achieve what you want with a Git post-commit hook. whether or not this is a wise thing to be doing is another matter entirely.
Hrm. Somehow my link to http://kernel.org/pub/software/scm/git/docs/v1.3.3/hooks.html isn't showing up, but that's what you want to read.
Okay, I might have found a solution.
Capistrano might hold the answer, although my application is non ruby.
Here's a blog post I found, and I will try to implement it.
Automated deployment