I'm sure there are other members on here who will have great tips, but here is my particular thinking on the subject and the suggestions that I have to offer:
It is human nature for people to be apprehensive about strangers approaching them outside of a familiar social or professional setting where they are in a comfort zone. Generally speaking, the street is not such an environment . The "fight or flight" instinct, the need to know they are safe and secure, is deeply embedded in the human brain stem and has its roots going back to the stone age or before, when there were a lot of predators to deal with. So this need for safety and security is at the top of the list of peoples' needs, and overrides their social desires and needs. I guess that is just psychology 101.
So, the key is to put them at ease by conducting yourself in a manner that will make them be less defensive and assure them that they have nothing to fear from you. Even if they do not fear a stranger on the street they may be concerned that one who approaches them wants to panhandle money from them or sell them something or push some kind of political or charitable agenda, which most often people just don't feel like dealing with.
How then, do we put them at ease, show them we are no threat or a pest, and make them receptive to being entertained by magic? Well, if you approach someone and ask something like: "Hi, Would you like to see a magic trick?" it is an invitation for them to say No. They are taken by surprise, and their guard is very much up at that point. The way around that is instead of starting out by asking if you can do magic, and setting yourself up for rejection, is to just DO magic before you say anything.
What I used to do when performing close up magic on the street was to walk up to someone or a group, not getting to close into their space, but close enough and in a position where I knew they could clearly see me. Holding a piece of flash paper and an old silver dollar finger palmed, I would light the flash paper and produce the coin out of the flame. Most people think that is really cool and magical, and often they would smile, and automatically just relax. They would then know I was not a criminal, or a panhandler, or salesman or canvassing them in some way or other, and at the same time, they would know I am a magician, without my ever needing to say so. Unless they seemed like they were unfriendly or didn't want to bother, I would then go into a coin roll, then a couple vanishes and reproductions. At that point the ice is broken, and they are loosened up to where you can't closer and say, "Thanks for watching. My name is ______; I hope you enjoyed that. If you liked that one I've got one more you might enjoy." Most of the time they will give you the green light. Then pull out your cards or whatever. [Caution: Don't try to do anything that requires borrowing money from them.] Sometimes they will, decline to see any more magic, and if they do do, don't take it to heart or take it personal. There will always be people who just aren't in to watching at that moment, and there could be many reasons, such as they need to be somewhere, or they have something else weighing on their mind, or just aren't in the mood. Wish them a great day! Overall, your confidence level will get higher with experience, and if you tell yourself you are going to have fun and project a friendly, polite, light-hearted attitude - and things will go smashingly!