If one has a job where his employer informs him that if he wears a kippa he will be fired, does he have to wear a kippa?
Firstly, I don't know of anyone who requires a kippa as opposed to some other head covering. So if at work he could wear a beret, hard-hat, baseball cap, coonskin cap, deerstalker, you name it, by all means do that.
There's the issue of head coverings for praying; for making blessings; for eating; and then at all other times.
Much of yarmulka as we know it is a very, very strong and well-founded custom (minhag), based on a Gemara about how a head covering kept a rabbi out of trouble.
As a theoretical concept, if keeping a custom means losing your job, you don't have to lose your job. (Heard from Rabbi Welcher; minhag is overridden l'tzorech parnasa).
But practically today, it's advisable for a person to talk with his rabbi regarding his individual situation. We don't want people shrugging off deep-seated customs willy-nilly. It's also a good opportunity to have a spiritual checkup with the rabbi, make sure you still feel (and live) Jewish with this different situation.
I work at a job in sales where I deal with contracts and large amounts of money. I am also one of the few people on the team who are Jewish.
My rav reasoned that due to the fact that some people are unhappy with the service we provide (and would immediately blame the fact that I was Jewish on their dissatisfaction) that wearing a kippah would cause a chillul hashem, especially with the demographics of the neighborhood where I work. It is not the most Jewish friendly area of town. In addition we thought, though did not prove, that I would lose business by wearing my kippah. He paskined that I should not wear my kippah at work and I havn't had any issues.
I wrote a piece on another blog about 3 years ago, that I think is still valid as a general rule with regard to wearing a Kippah at job interviews or at work. And I still believe that if an employer won't tolerate your wearing a Kippah you may not want to work there, but everyone needs to make his own decision. However, in your particular case, it sounds like your employer is violating Title VII of the Civil Rights Act of 1964, which ensures religious freedom (among other freedoms) in the workplace in the U.S. Of course, I don't know if you are located/working in the U.S., but if you are, it might be worth reporting it to the United States Equal Employment Opportunity Commission.
Just to paraphrase the closing paragraph from the other piece, what I have to say on the subject in general is this: it's a personal choice. If you feel wearing a Kippah is hurting you in your employment or job search, you have every right to take it off - and you have every right to put it back on at any point. However, be prepared to be made uncomfortable for doing so, and begin looking for a new job with an employer that can see past it - all while diligently doing your job. On the other hand, if you choose to wear it, I will give you the Berachah (blessing) given to me by a rabbi I consulted on the subject: You will get a job that is good for you (either by this one changing to become friendlier or another one), and being Moser Nefesh will come back to reward you, either in this world or the next. Even if it isn't about observance/Halachah, but you simply wear your Kippah as a badge of honor and Jewish pride, continue to do so because you will ultimately find something suitable, and your colleagues – particularly in an environment where they are willing to hire someone who is proud of his heritage and beliefs – will respect you for it.
Sh”t Igrot Moshe (C”M 1:93 and O”C 4:2) writes that since wearing a Kippah is neither a positive or negative mitzvah one need not loss a large portion of his money by not taking such a job. However since they don’t care if you wear it in another room or in the marketplace one must wear it in such places. Sh”t Igrot Moshe Y”D 4:11(3) adds that even according to the Taz who holds there’s a prohibition of Chukot HaGoyim (that the practice of Goyim used to be to always wear hats and when they saw down to eat or something similar they would take off their hat) nowadays it wouldn’t apply since people don’t wear hats at all. Thus, one can take a job at a place where they don’t allow one to wear a Kippah. However, if they allow one to wear a regular hat (not a Kippah) one should wear a hat he wears regularly.
This would be permissible because it is only Midat HaHasidut (see Bet Yosef O"H 91, Rama Darke Moshe 2:3). Although in other sources (siman 46, 8) it may seem that he says it is Asur- Rav Dawid Yosef Shelita writes in Oserot Yosef O"H 4 that the opinion in siman 91 is the correct. According to most Poskim it is only Midat HaHasidut (see Birke Yosef 2:2, Bah siman 2, Perisha 2:8, Magen Abraham 91:5) However, those who follow the Taz it may be Asur. Since there are so many Matirim, and opinions that it is only Midat HaHassidut, I presume that your Rav will give you a Heter.
HOWEVER, when blessing, Lechatehila you must cover your head, and whenever you say H's Name.
I have worn a Kippah to every job interview and job I've ever held and have never had an issue. However, a colleague of mine works as a public school teacher in PA where (apparently) the education laws forbid him from wearing a kippah because it would violate the prohibition of public school employees making displays of religion. I don't think that going without a head covering during work hours is such a big deal next to losing your parnasa.