Exhibit 10.1
 AMENDMENT NO. 2 TO
 AMENDED AND RESTATED CREDIT AGREEMENT
 Amendment Effective Date Borrower Banks Administrative
Agent
 RECITALS
 Credit
Agreement
 Guarantors Guaranty
   ARTICLE I.
DEFINITIONS
 Section 1.01 Terms Defined Above
 Section 1.02 Terms Defined in the Credit Agreement
 Section 1.03 Other Definitional Provisions .




---



##### 



ARTICLE II.
AMENDMENTS
 Section 2.01 Amendments to Credit Agreement .
 Section 1.01
  EBITDA  means, for the Limited Partner and its Subsidiaries on a Consolidated basis for
any period, (a) Net Income for such period plus (b) to the extent deducted in determining
Net Income, Interest Expense, taxes, depreciation, amortization and other noncash items for such
period plus (or minus) (c) any net change in deferred revenue related to the satisfaction
of any minimum revenue commitments by any contract counterparties.
 Exhibit C
 ARTICLE III.
REPRESENTATIONS AND WARRANTIES
 Section 3.01 Borrower Representations and Warranties
 -2-




---



##### 



Section 3.02 Guarantors Representations and Warranties
 ARTICLE IV.
CONDITIONS
 Effective Date
 Section 4.01 Documents.
 Section 4.02 No Default
 -3-




---



##### 



Section 4.03 Representations
 Section 4.04 Fees and Expenses
 ARTICLE V.
MISCELLANEOUS
 Section 5.01 Effect on Credit Documents; Acknowledgments
      -4-




---



##### 



Section 5.02 Reaffirmation of the Guaranty
 Section 5.03 Counterparts
 Section 5.04 Successors and Assigns
 Section 5.05 Invalidity
 Section 5.06 Governing Law .
 Section 5.07 Additional Agents
 Section 5.08 Patriot Act.
 -5-




---



##### 



Section 5.09 Entire Agreement THIS AMENDMENT, THE CREDIT AGREEMENT AS AMENDED BY THIS
AMENDMENT, THE NOTES, AND THE OTHER CREDIT DOCUMENTS CONSTITUTE THE ENTIRE UNDERSTANDING AMONG THE
PARTIES HERETO WITH RESPECT TO THE SUBJECT MATTER HEREOF AND SUPERSEDE ANY PRIOR AGREEMENTS,
WRITTEN OR ORAL, WITH RESPECT THERETO.
 THERE ARE NO UNWRITTEN ORAL AGREEMENTS AMONG THE PARTIES.
  -6-




---



##### 



BORROWER :
 HOLLY ENERGY PARTNERS  OPERATING, L.P.,
 
 
 
 
 By:Bruce R. ShawSenior Vice President andChief Financial Officer




---



##### 



GUARANTORS:
 HEP PIPELINE GP, L.L.C.
 HEP REFINING GP, L.L.C.
 HEP MOUNTAIN HOME, L.L.C.
 HEP PIPELINE, L.L.C.
 HEP REFINING, L.L.C.
 HEP WOODS CROSS, L.L.C.
 Each by:
    
    Holly Energy Partners  Operating, L.P., a Delaware limited
partnership and its Sole Member
 
 
 
 
 By:Bruce R. ShawSenior Vice President andChief Financial Officer
 HOLLY ENERGY FINANCE CORP., a DelawarecorporationBy:Bruce R. ShawVice President andChief Financial Officer




---



##### 



HEP NAVAJO SOUTHERN, L.P., a Delaware limitedpartnershipHEP PIPELINE ASSETS, LIMITED PARTNERSHIP,a Delaware limited partnershipHEP FIN-TEX/TRUST-RIVER, L.P.,a Texas limitedpartnershipEach by:
    
    HEP Pipeline GP, L.L.C., a Delaware limited
liability company and its General Partner
 
 
 
 
 
 By:Bruce R. ShawSenior Vice President andChief Financial Officer




---



##### 



HOLLY ENERGY PARTNERS, L.P.,
 
 
 By:Bruce R. ShawSenior Vice President andChief Financial Officer
 HEP REFINING ASSETS, L.P.,
 
 
 
 
 
 
 By:Bruce R. ShawSenior Vice President andChief Financial Officer




---



##### 



HEP LOGISTICS GP, L.L.C.,
 
 
 
 By:Bruce R. ShawSenior Vice President andChief Financial Officer




---



##### 



ADMINISTRATIVE AGENT:UNION BANK OF CALIFORNIA, N.A., asAdministrative Agent and Sole Lead ArrangerBy:Sean Murphy, Senior Vice PresidentBANKS:UNION BANK OF CALIFORNIA, N.A., as a BankBy:Sean Murphy, Senior Vice President




---



##### 



BANK OF AMERICA, N.A., as a Bank and as Syndication AgentBy:Name:Title:




---



##### 



GUARANTY BANK, as a Bank and asDocumentation AgentBy:Name:Title:




---



##### 



FORTIS CAPITAL CORP., as a BankBy:Name:Title:By:Name:Title:




---



##### 



WELLS FARGO BANK, NATIONALASSOCIATION, as a BankBy:Name:Title:




---



##### 



U.S. BANK NATIONAL ASSOCIATION, as a BankBy:Name:Title:




---



##### 



PRUDENTIAL RETIREMENT INSURANCE AND ANNUITY COMPANY, as a BankBy:
    
    Prudential Investment Management, Inc.,as investment managerBy:Timothy M. LaczkowskiVice PresidentPRUCO LIFE INSURANCE COMPANY, as a BankBy:Timothy M. LaczkowskiVice President




---



##### 



COMPASS BANK, as a BankBy:Name:Title:




---



##### 



BANK OF SCOTLAND plc, as a BankBy:Name:Title:




---



##### 



CAPITAL ONE, N.A., as a BankBy:Name:Title:




---



##### 



COMERICA BANK, as a BankBy:Name:Title:




---



##### 



NATIXIS, as a BankBy:Name:Title:By:Name:Title:




---



##### 



PNC BANK, NATIONAL ASSOCIATION, as a BankBy:Name:Title:




---



##### 



EXHIBIT C
 FORM OF COMPLIANCE CERTIFICATE
 FOR THE PERIOD FROM  , 200  TO  , 200
 Credit Agreement Borrower Banks Issuing Banks Administrative Agent
  Leverage Ratio
 (a) Consolidated Funded Debt
    
    $(b) Consolidated Net Income 1
    
    $(c) Interest Expense 2
    
    $(d) taxes, depreciation, amortization,
and other non-cash items
    
    $(e) any net change in deferred revenue
related to the satisfaction by counterparty of
a minimum revenue commitment obligation
    
    $
 
 1
    
    The Consolidated net income of the Borrower and
its Subsidiaries, as determined in accordance with GAAP consistently applied,
excluding, however, any net gain or loss from extraordinary or non-recurring
items (including, but not limited to, any net gain or loss during such period
arising from the sale, exchange or other disposition of capital assets other
than in the ordinary course of business).2
    
    For the Borrower and its Subsidiaries determined
on a Consolidated basis, for any period, the total interest, letter of credit
fees, and other fees incurred in connection with any Debt for such period,
whether paid or accrued, including, without limitation, all commissions,
discounts and other fees and charges owed with respect to letters of credit and
bankers acceptance financing, all as determined in conformity with GAAP. Exhibit C - Page 1 of 3




---



##### 



(f) EBITDA3 = (b) + (c) 4 + (d) 5 +/- (e)
    
    $(g) Pro Forma EBITDA from Acquisitions and Capital
Expansion Projects
    
    $(h) Total Pro Forma EBITDA = (f) + (g)
    
    $Leverage Ratio = (a) divided by (h)Maximum Leverage Ratio during a Specified
Acquisition Period
    
    
    5.75 to 1.00Maximum Leverage Ratio at all other times
    
    
    5.25 to 1.00Compliance
    
    Yes     No
 Interest Coverage Ratio
 (a) Total Pro Forma EBITDA (see I(h) above)(b) Interest Expense67(c) Pro Forma Interest Expense from Acquisitions
and Capital Expansion Projects6(d) Total Pro Forma Interest Expense = (b+c)Interest Coverage Ratio = (a) divided by (d)Minimum Interest Coverage Ratio
    
    
    2.50 to 1.00Compliance
    
    Yes     No
 
 3
    
    Calculate EBITDA for the four fiscal quarter
period then ended.4
    
    To the extent deducted in determining Consolidated
Net Income.5
    
    To the extent deducted in determining Consolidated
Net Income.6
    
    For the Limited Partner and its Subsidiaries
determined on a Consolidated basis, the total interest, letter of credit
fees, and other fees incurred in connection with any Debt for such
period, whether paid or accrued, including, without limitation, all
commissions, discounts and other fees and charges owed with respect to
letters of credit and bankers acceptance financing, all as determined in
conformity with GAAP. To the extent that the EBITDA included in the
calculation of the Interest Coverage Ratio for any period shall include
pro forma amounts in connection with the Acquisition of any Person during
such period, the Interest Expense shall also include pro forma amounts
with respect to the Interest Expense of such Person.7
    
    Calculate the Interest Expense for the four fiscal
quarter period then ended. Exhibit C - Page 2 of 3




---



##### 



HOLLY ENERGY PARTNERS  OPERATING, L.P.,a Delaware limited partnershipBy: HEP Logistics GP, L.L.C., a Delaware
limited liability company, its General PartnerBy: Holly Energy Partners, L.P., a Delaware
limited partnership, its Managing MemberBy: HEP Logistics Holdings, L.P., a Delaware
limited partnership, its General PartnerBy: Holly Logistic Services, L.L.C., a Delaware
limited liability company, its General PartnerBy:Name:Title:
 Exhibit C - Page 3 of 3