हलव के लिए एक और दृष्टिकोण इस मुद्दे को समझना है कि उसकेोकू ऐप से जुड़ी .git/config फ़ाइल क्या कर रही है और आवश्यक बदलाव कर रही है।
1. अपने हरोकू परियोजना की रूट से .git/config
खोलें।
आपकी गिट कॉन्फ़िगरेशन फ़ाइल इस तरह कुछ दिखाई दे सकती है, खासकर यदि आप अपनी मशीन पर कुछ हुकोकू खाते जॉगलिंग कर रहे हैं।
[email protected]{heroku.account}
के बजाय ~/.ssh/config
फ़ाइल में कॉन्फ़िगरेशन के कारण दिखाता है। heroku-app-8396.git
का संदर्भ आपके heroku प्रोजेक्ट नाम से मेल खाने के लिए अपडेट किया जाना चाहिए। आपके प्रत्येक प्रत्येकोकू खाते में ~/.ssh/config
फ़ाइल में प्रवेश होना चाहिए। जाहिर है, उसके हेरोकू प्रोजेक्ट से जुड़े हेरोकू खाते को आपकी .git/config
फ़ाइल में दिखाना चाहिए।
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:heroku-app-8396.git
[remote "heroku"]
fetch = +refs/heads/*:refs/remotes/heroku/*
url = [email protected]:heroku-app-8396.git
[branch "master"]
remote = origin
merge = refs/heads/master
[heroku]
account = heroku.account
2. जब मैं git pull heroku master
चलाता हूं, तो सभी अच्छी तरह से चलते हैं।
$ heroku ps
! No app specified.
! Run this command from an app folder or specify which app to use with --app APP.
क्यों:
3. जब मैं heroku logs
चलाने के लिए, मैं एक त्रुटि संदेश मिलता?
जहाँ तक मैं कह सकता हूं, heroku
कमांड को यह नहीं पता कि {heroku.account}
संदर्भों के साथ क्या करना है।
$ git pull heroku master
! Your key with fingerprint d6:1b:4c:48:8c:52:d4:d6:f8:32:aa:1a:e7:0e:a2:a1 is not authorized to access smooth-robot-8396.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
: हम
com
करने के लिए उन संदर्भों को बदलने के लिए,
heroku
आदेशों एक बार फिर से काम करते हैं, लेकिन अब हमारे
git
कॉल कह रहे हैं (जो डिफ़ॉल्ट मान जब आप 'खाते' Heroku प्लगइन उपयोग नहीं कर रहे है) अगर वहाँ एक अलग समस्या है इस को हल करने
एक तरह से heroku
के लिए git
के लिए एक रिमोट और एक रिमोट परिभाषित करने के लिए और फिर heroku
बताओ जो रिमोट का उपयोग करने के लिए है।
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:heroku-app-8396.git
[remote "heroku"]
fetch = +refs/heads/*:refs/remotes/heroku/*
url = [email protected]:heroku-app-8396.git
[remote "heroku-app"]
fetch = +refs/heads/*:refs/remotes/heroku/*
url = [email protected]:heroku-app-8396.git
[branch "master"]
remote = origin
merge = refs/heads/master
[heroku]
remote = heroku-app
account = heroku.account
मैं स्पष्ट रूप से दूरदराज जब मैं एक दूरस्थ करने के लिए सामग्री धक्का कर रहा हूँ उल्लेख करना चाहते है, तो heroku
दूरदराज के लिए है, भले ही इस विन्यास भी जोर दे रह सकते हैं/डिफ़ॉल्ट का उपयोग कर खींच (जैसे, git push
)। मैं एक नया रिमोट 'heroku-app' बनाता हूं और को heroku
को रिमोट का उपयोग करने के लिए जोड़ता हूं जिसमें यूआरआई में हेरोकू खाता शामिल नहीं है।
अब मैं अपना git
और heroku
आदेश चला सकता हूं जैसा कि मैं चाहता हूं।
अब आपको सीडर स्टैक निर्दिष्ट नहीं करना है, यह अब डिफ़ॉल्ट है –
पहले कुछ उत्तरों के पीछे स्क्रॉल करना सुनिश्चित करें। [यह एक] (http://stackoverflow.com/a/24816347/199712) सबसे अच्छा है। –