简体   繁体   中英

Git cannot push code to bitbucket

I just created a new repository on Bitbucket. I have existing code on my system. I navigated to the root directory of my project and executed the code below:

git init
git add --all
git commit -m 'Initial commit'
git remote add origin git@bitbucket.org:<team>/<repo name>.git
git push origin master

Running the last command gives me the following error:

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

By the way, I'm using git via https . Earlier it used to ask me for my Bitbucket password, but it didn't even prompt for the password this time.

Please help

通过运行此命令更改为https而不是ssh

git remote set-url origin https://<repo_owner_name>@bitbucket.org/<teamname>/<reponame>.git

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM