At the LORD's command, the people of Israel left the Sin Desert and moved from place to place. Eventually they came to Rephidim, but there was no water to be found there.
References for Exodus 17:1
So once more the people grumbled and complained to Moses. "Give us water to drink!" they demanded. "Quiet!" Moses replied. "Why are you arguing with me? And why are you testing the LORD?"
But tormented by thirst, they continued to complain, "Why did you ever take us out of Egypt? Why did you bring us here? We, our children, and our livestock will all die!"
Then Moses pleaded with the LORD, "What should I do with these people? They are about to stone me!"
The LORD said to Moses, "Take your shepherd's staff, the one you used when you struck the water of the Nile. Then call some of the leaders of Israel and walk on ahead of the people.
I will meet you by the rock at Mount Sinai. Strike the rock, and water will come pouring out. Then the people will be able to drink." Moses did just as he was told; and as the leaders looked on, water gushed out.
References for Exodus 17:6
Moses named the place Massah -- "the place of testing" -- and Meribah -- "the place of arguing" -- because the people of Israel argued with Moses and tested the LORD by saying, "Is the LORD going to take care of us or not?"