i used a secondhand e bike kit but i cant get it to work guys I put a secondhand e bike kit on my bike but it doesn't want to work its a 36volt 22amp the battery has full charge at out put of 42 volts hooked it  all up push the thumb control nothing i have been at it for days trying to work it out if anyone can help out would be good.  thanks jason
Can the connector on the motor be connected only in one orientation? (Is there a notch of some sort to prevent you from connecting it incorrectly?)

It looks like this connector is used for both the motor phase wires (3 of them) and hall sensor wires (5 of them). If you connect these incorrectly you risk damaging the hall sensors and the motor coils won't work correctly or won't work at all. 

There are controller testers available online for example on AliExpress. They are quite cheap (approx 15 euro IIRC) and are perfect for your situation
 You can test the workings of the throttle
 Test your hall sensor and motor coils. Test the phase wire output of the controller etc. Makes it a lot easier to test. 
-------

Link:
https://nl.aliexpress.com/item/4000327577472.html?spm=a2g0o.productlist.0.0.aabf53e5ZgR3Xv&amp;algo_pvid=f085ff01-8b80-48f2-bb35-60c9350f4f92&amp;algo_expid=f085ff01-8b80-48f2-bb35-60c9350f4f92-3&amp;btsid=0b0a187b15824111666037870e2379&amp;ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

You can use a multi meter to test the continuity of your motor coils (test two of the three phase wires relative to each other and check if they have continuity, if they don't one or more of your coils are burnt out).

Some controllers have both a connection for throttle and a connection for pedal assist sensor. Check if you have both and which you are using (can be checked by checking the wire colors and comparing with similar looking controllers online (most likely on Aliexpress, they often include some information on what wires do what)).

If you have both a fore mentioned connectors you could try connecting your throttle to the currently unused connector and seeing if this works.

Most controllers have a wire which you have to connect to either the battery positive or battery negative in order for the controller to turn on. In my experience this wire is usually a thin red wire. To which side of the battery you have to connect it for the controller to turn on differs from controller to controller. Check if this wire Is present and if it is check if it is connected. It is often called a 'power lock' wire.

Most controllers have an output for connecting a light or alarm which outputs a low voltage DC such as 12V DC. If this is present on your controller you can measure if there is a voltage across this wire/connector and if there is you know your controller is in fact turned on. 

You can disconnect your throttle and on the connector (the side that is connected to the controller) connect the red wire with the non-black wire (usually there is a red wire for 5V, black wire for GND and one more wire which is the signal wire). When you connect the red wire with signal wire it's as if you're giving full throttle. If you connect these wires and the motor turns you know your issue is in the throttle (throttle is faulty).

Check if your controller has wires to connect the brakes (some e-bike brakes have switches in them in order to signal to the controller that you are braking). These switches are called ' brake cutoff sensors' (among other names) and usually stop power to the motor when you activate them by braking. Some of these switches are normally open and some are normally closed ('normally closed' meaning the switch is closed/circuit is closed when the brake lever is not pressed and the switch/circuit is open when the brake lever is pressed).
If you have a controller which works with 'normally open' switches and you've got a short somewhere in your brake sensor wires (causing the controller to think that you're pressing the brake lever) the motor will not have any power from the controller since it will think you are braking..
or if you have a controller which works with normally closed switches and you do not connect anything to these brake sensor wires it will be as if you're constantly braking (but keep in mind this type of switch is much less common in these types of brake sensors if even available at all).

Possible steps you could take to try and find the problem:

1)

Check if battery outputs voltage and if so if voltage is high enough (above nominal voltage of battery pack or at least above approx 3 volt per cell in series (you'll have 10 cells in series for a 36v nominal battery pack).

2)

Check if the controller receives power from the battery, either by measuring voltage at the bullet connectors or by poking a hole in the insulation with your multi meter prongs (in the battery plus and min wires leading up to the controller.

3) 

Check if (if present) the output for the light/alarm has a voltage output (for example 12V DC or 6V DC. If it does you know the controller is turned on. If it doesn't check the 'power lock' wire, if it is connected properly, if it is damaged anywhere.

4)

Disconnect throttle and short red and non-black (signal) wire of throttle connector (controller side). If motor spins when these are connected your throttle is faulty.

5) 

Connect 'learning wires' if available. these are usually two wires of the same color on the controller with 2 individual plugs (one male one female) which fit together. when you connect them together the wheel should start spinning. If this does happen (if the wheel indeed spins) you know your controller is turned on, battery isn't the issue, phase wires aren't causing your issue.

6)

Check if motor connector can be connected in multiple ways and if so if it is connected properly (especially the 3 phase wires, the hall sensor wires can be left disconnected for now for this troubleshooting stage).

Try some or all of these things and keep track of the results. Add your findings to your question and let me know when you've done so and I'll try and help you troubleshoot. It's a lot easier when I've got some info to work with :)
Good luck!