2017-06-03 56 views
0

我正在通過IBM的區塊鏈課程3學習區塊鏈。當我嘗試部署鏈代碼時,它會選擇主代碼而不是版本2.0。我看到一個相關的post,但它沒有幫助。IBM Bluemix課程3 - 部署chaincode v2.0

完整的JSON:

{ 
 
    "jsonrpc": "2.0", 
 
    "method": "deploy", 
 
    "params": { 
 
     "type": 1, 
 
     "chaincodeID": { 
 
      "path": "https://github.com/dithmarschen96/learn-chaincode.v2/start" 
 
     }, 
 
     "ctorMsg": { 
 
      "function": "init", 
 
      "args": [ 
 
       "hi there" 
 
      ] 
 
     }, 
 
     "secureContext": "user_type1_1" 
 
    }, 
 
    "id": 1 
 
}

和錯誤消息(注意:它說無法讀取用戶的名字,但如果我的路徑中刪除」 .V2" 它具有相同的工作原理用戶名)。

"code": -32001, 
"message": "Deployment failure", 
"data": "Error when deploying chaincode: Error getting chaincode package bytes: Error getting code 'go get' failed with error: \"exit status 1\"\n# cd .; git clone https://github.com/dithmarschen96/learn-chaincode.v2 /opt/gopath/_usercode_/557323755/src/github.com/dithmarschen96/learn-chaincode.v2\nCloning into '/opt/gopath/_usercode_/557323755/src/github.com/dithmarschen96/learn-chaincode.v2'...\nfatal: could not read Username for 'https://github.com': No such device or address\npackage github.com/dithmarschen96/learn-chaincode.v2/start: exit status 128\n" 

如果我在路徑中刪除「.v2」,它工作正常,但我得到的是主人,而不是分支。

如何在JSON中引用版本2以進行郵寄呼叫?

回答

0

在文檔的過程中發現:

提示:您可以使用gopkg.in提供一個使用GitHub的分支 版本chaincode部署網址: http://gopkg.in/ /learn-chaincode.v2/完成

相關問題