我创建了一个新的远程仓库,并试图使用git push -u origin master命令后,我对我的本地文件推到新的存储库中的第一次add它和commit它。然而,它弹出这个git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.。我该如何修复这个致命错误?
我已经尝试过
使用 Git 时如何解决 Permission denied (publickey) 错误?
此链接中的问题似乎发生在第一次使用 git 时。我已经使用我的 git 一段时间了,我还需要遵循这个解决方案吗?谁能给我一个更具体的解决方案?
这是我得到的致命错误
C:\Users\ASUS\Desktop\React-Practice App\my-app>git status
On branch master
nothing to commit, working tree clean
C:\Users\ASUS\Desktop\React-Practice App\my-app>git push -u origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud) 我已经命令npm run dev运行我的代码。但是,它弹出了几个错误它弹出的第一个错误是Module not found: Error: Can't resolve '../../build/contracts/User.json'我不知道为什么会弹出这个错误,因为在我的webpack.config.js文件中我已经设置了
loaders: [
{ test: /\.json$/, use: 'json-loader' },
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['es2015'],
plugins: ['transform-runtime']
}
}
]
Run Code Online (Sandbox Code Playgroud)
我试过把json-loader改成json,还是不行。 https://github.com/webpack-contrib/json-loader/issues/17
webpack.config.js
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './app/javascripts/app.js',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'app.js'
},
plugins: [
// Copy our app's index.html to the build folder.
new CopyWebpackPlugin([
{ from: './app/index.html', to: …Run Code Online (Sandbox Code Playgroud) 我尝试后得到了空数组,web3.eth.getAccounts().then(console.log);并且还收到了一个警告,即./node_modules/web3-eth-accounts/src/scrypt.js Critical dependency: the request of a dependency is an expression. 在这个项目中,我首先命令create-react-app lottery_react,然后我在lottery_react文件夹中更改App.js的所有内容都只修改一行web3.eth.getAccounts().then(console.log);并创建web3.js文件。我找不到这些文件有什么问题。请帮忙!
这是我的 App.js
import React, {Component} from 'react';
import logo from './logo.svg';
import './App.css';
import web3 from './web3';
class App extends Component {
render(){
web3.eth.getAccounts().then(console.log);
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener …Run Code Online (Sandbox Code Playgroud)
我使用该命令truffle unbox react构建了一个 dapp。这只是我的 dapp 开发的第一步。然而,这很糟糕。不断弹出
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
Run Code Online (Sandbox Code Playgroud)
这个错误。我已经用谷歌搜索过这个错误。因此,我将 python 默认版本设置为 2.7 并安装 Visual Studio 2015 和 Visual Studio 2017。此外,我还重新安装了 Node-gyp 和 npm 以确保它是否是最新版本。而且,npm install --global --production windows-build-tools我已经尝试了任何可以谷歌搜索的方法。请帮忙!