General Motors has secured a US$5bn credit facility, returning to the capital markets a year after emerging from bankruptcy.