To get a license file, I followed the steps below:
I commited the exact output (not from the GitHub UI, I created the file locally and commited that) but GitHub doesn't show the license in the repo header. It also doesn't display the license summary when I open the file itself.
What can I do to make GitHub recognize my standard MIT license?
Solved! Solved! Go to Solution.
Hi there @safakgur,
That's not cool, but I might be able to help you here. Does removing the .txt extension help with this? :)
Let me know.
Thanks for checking that, @safakgur.
Let's see if removing the file locally > pushing the change to GitHub > creating the file using GitHub.com helps?
Just to make sure, when creating the file copy this URL replacing the username/organisation, repository and branch with yours. Make sure to also press "Choose a license template" > MIT
If that doesn't work, just let me know and I'll see what else I can suggest :)
Thank you @ItsPugle, I just created a LICENSE file exactly as you suggested and removed the old LICENSE.txt using the GitHub UI. Still nothing changes. One thing to note is that I'm not doing these experiments on master. I'm on a branch called license. I tried changing my default branch to license, however and that didn't help.
Hi again, I didn't want to touch the master branch of this repo so I've created a couple more to test. Turns out the license needs to be on the repo's main branch but it's ok for the main branch to be different than master. I thought I tested this case yesterday but apparently I did something wrong.
So it works with the license file I created and committed using the GitHub UI but not when I copy that license to a local file and commit+push from there. I wonder whether the files were the same, i.e. if there were some invisible differences like different line endings.
I'll do a byte by byte comparison when I can, thank you for the suggestions.
Ah, that's great news @safakgur! I'm so glad you got it sorted.
I'd also really suggest you also reach out to the folks over at GitHub support. They'll be able to have a look backstage and see why this has happened (so it doesn't happen again!) You can get in touch with them over here: https://github.com/contact :)
If you need a hand with anything, just let me know - I'm here for you.