I installed a light fixture on the side of my garage, and I ran a line to get power from an existing light fixture on the front of the garage. I want both lights to be on the same line so they can share the existing switch that controls the front light. I could not tap into the electrical box at the front light fixture because the front of the garage is bricked and I could not feed the new cable from inside the garage through the wall (I suspect the cable does not go straight through the wall, but makes a turn before going through the brick). So, I cut into the cable from inside the garage and made my connections inside a junction box.
My problem is that when I cut the existing cable the wires were too short to connect inside the junction box, so I pigtailed a few scrap pieces of wire to make them long enough to connect. I connected them in a 4" x 4" junction box and placed a cover plate on it. The junction box is accessible.
My question is, is this the correct way to make the connection? Or, I read that I could install 2 junction boxes about a foot apart and install a cable this is long enough in between both boxes? Or do you have any other suggestions?