GitHub not recognizing auto-generated MIT license #22973
-
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? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
Hi there, thank you for the answer. I tried both removing the extension and adding a .md extension, neither worked. |
Beta Was this translation helpful? Give feedback.
-
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 filecopy 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 :) |
Beta Was this translation helpful? Give feedback.
-
Thank you @timrossback, 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. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that @safakgur, Would you be able to try creating a LICENSE file on the master branch? If that doesn’t work, would you be able to try entering “Test Test Test” instead of “Şafak Gür” on line 3 of the license? :) |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Hello, I have the same issue here*; did everything mentionned; move ; delete ; create. May we have a gitattribute for that? |
Beta Was this translation helpful? Give feedback.
Thanks for that @safakgur,
Would you be able to try creating a LICENSE file on the master branch? If that doesn’t work, would you be able to try entering “Test Test Test” instead of “Şafak Gür” on line 3 of the license? :)